Преглед изворни кода

HUE-8888 [core] Removing deprecated yaml files

Replaced by helm.
Romain пре 5 година
родитељ
комит
e0dcda9619

+ 0 - 6
tools/kubernetes/README.md

@@ -9,12 +9,6 @@ Assuming you have a Kubernetes cluster configured with Helm installed and images
 * [Helm](helm)
    * [Hue](helm/hue)
    * [Website](helm/website)
-* [YAML](yaml)
-   * [Hue](yaml/hue)
-   * [Postgres](yaml/postgres)
-   * [NGINX](yaml/nginx)
-   * [Celery](yaml/celery)
-   * Daphne (TBD)
 * [Container Images](/tools/docker)
    * [Hue](/tools/docker/hue)
    * [Nginx](/tools/docker/nginx)

+ 0 - 13
tools/kubernetes/yaml/README.md

@@ -1,13 +0,0 @@
-
-# How to install
-
-    kubectl apply -f hue/
-
-# How to uninstall
-
-    kubectl delete -f hue/
-
-# If using Workers
-
-    kubectl create -f celery/
-    kubectl create -f redis/

+ 0 - 33
tools/kubernetes/yaml/celery/deployment-flower.yaml

@@ -1,33 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: celery-flower
-  labels:
-    deployment: celery-flower
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      pod: celery-flower
-  template:
-    metadata:
-      labels:
-        pod: celery-flower
-    spec:
-      containers:
-      - name: celery-flower
-        image: gethue/hue
-        command: ['./build/env/bin/celery', 'flower', '-A', 'desktop']
-        ports:
-          - containerPort: 5555
-        resources:
-          limits:
-            cpu: 100m
-        volumeMounts:
-        - name: config-volume
-          mountPath: /usr/share/hue/desktop/conf/z-hue.ini
-          subPath: hue-ini
-      volumes:
-        - name: config-volume
-          configMap:
-            name: hue-config

+ 0 - 28
tools/kubernetes/yaml/celery/deployment-worker.yaml

@@ -1,28 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: celery-worker
-  labels:
-    deployment: celery-worker
-spec:
-  replicas: 1
-  selector:
-    matchLabels:
-      pod: celery-worker
-  template:
-    metadata:
-      labels:
-        pod: celery-worker
-    spec:
-      containers:
-        - name: celery-worker
-          image: gethue/hue
-          command: ['./build/env/bin/celery', 'worker', '-A', 'desktop', '-l', 'info']
-          volumeMounts:
-          - name: config-volume
-            mountPath: /usr/share/hue/desktop/conf/z-hue.ini
-            subPath: hue-ini
-      volumes:
-        - name: config-volume
-          configMap:
-            name: hue-config

+ 0 - 10
tools/kubernetes/yaml/celery/service-flower.yaml

@@ -1,10 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: celery-flower
-spec:
-  selector:
-    pod: celery-flower
-  ports:
-  - port: 5555
-  type: NodePort

+ 0 - 15
tools/kubernetes/yaml/cert-manager/clusterissuer-letsencrypt-prod.yaml

@@ -1,15 +0,0 @@
-apiVersion: certmanager.k8s.io/v1alpha1
-kind: ClusterIssuer
-metadata:
-  name: letsencrypt-hue-prod
-spec:
-  acme:
-    # The ACME server URL
-    server: https://acme-v02.api.letsencrypt.org/directory
-    # Email address used for ACME registration
-    email: team@gethue.com
-    # Name of a secret used to store the ACME account private key
-    privateKeySecretRef:
-      name: letsencrypt-hue-prod
-    # Enable the HTTP-01 challenge provider
-    http01: {}

+ 0 - 15
tools/kubernetes/yaml/cert-manager/clusterissuer-letsencrypt-staging.yaml

@@ -1,15 +0,0 @@
-apiVersion: certmanager.k8s.io/v1alpha1
-kind: ClusterIssuer
-metadata:
- name: letsencrypt-staging
-spec:
- acme:
-   # The ACME server URL
-   server: https://acme-staging-v02.api.letsencrypt.org/directory
-   # Email address used for ACME registration
-   email: team@gethue.com
-   # Name of a secret used to store the ACME account private key
-   privateKeySecretRef:
-     name: letsencrypt-staging
-   # Enable the HTTP-01 challenge provider
-   http01: {}

+ 0 - 22
tools/kubernetes/yaml/cert-manager/ingress-http.yaml

@@ -1,22 +0,0 @@
-apiVersion: networking.k8s.io/v1beta1
-kind: Ingress
-metadata:
-  name: hue-ingress
-  annotations:
-    kubernetes.io/ingress.class: nginx
-    # certmanager.k8s.io/cluster-issuer: letsencrypt-prod
-    # certmanager.k8s.io/acme-challenge-type: http01
-    # nginx.ingress.kubernetes.io/ssl-redirect: "true"
-spec:
-  rules:
-  - host: demo.gethue.com
-    http:
-      paths:
-      - backend:
-          serviceName: hue-balancer
-          servicePort: 80
-        path: /
-  # tls:
-  # - hosts:
-  #   - demo.gethue.com
-  #   secretName: letsencrypt-prod

+ 0 - 22
tools/kubernetes/yaml/cert-manager/ingress-https.yaml

@@ -1,22 +0,0 @@
-apiVersion: networking.k8s.io/v1beta1
-kind: Ingress
-metadata:
-  name: hue-ingress
-  annotations:
-    kubernetes.io/ingress.class: nginx
-    certmanager.k8s.io/cluster-issuer: letsencrypt-hue-prod
-    certmanager.k8s.io/acme-challenge-type: http01
-    nginx.ingress.kubernetes.io/ssl-redirect: "true"
-spec:
-  rules:
-  - host: demo.gethue.com
-    http:
-      paths:
-      - backend:
-          serviceName: hue-balancer
-          servicePort: 80
-        path: /
-  tls:
-  - hosts:
-    - demo.gethue.com
-    secretName: letsencrypt-hue-prod

+ 0 - 29
tools/kubernetes/yaml/gethue.com/deployment-docs.gethue.yaml

@@ -1,29 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: gethue-docs
-  labels:
-    deployment: gethue-docs
-spec:
-  selector:
-    matchLabels:
-      pod: gethue-docs
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        pod: gethue-docs
-    spec:
-      containers:
-      - name: gethue-docs
-        image: gethue/documentation:latest
-        imagePullPolicy: Always
-        ports:
-          - containerPort: 80
-        readinessProbe:
-          httpGet:
-            path: /
-            port: 80
-          initialDelaySeconds: 3
-          periodSeconds: 60
-          failureThreshold: 30

+ 0 - 13
tools/kubernetes/yaml/gethue.com/service-docs.gethue.yaml

@@ -1,13 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: gethue-docs
-  labels:
-    pod: gethue-docs
-spec:
-  selector:
-    pod: gethue-docs
-  ports:
-  - name: gethue-docs
-    port: 80
-  type: ClusterIP

+ 0 - 12
tools/kubernetes/yaml/hue/configmap.yaml

@@ -1,12 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: hue-config
-data:
-  hue-ini: |
-    [desktop]
-      [[task_server]]
-        enabled=false
-
-    [impala]
-      server_host=hostname.com

+ 0 - 33
tools/kubernetes/yaml/hue/cron-email-stats.yaml

@@ -1,33 +0,0 @@
-apiVersion: batch/v1beta1
-kind: CronJob
-metadata:
-  name: email-stats
-spec:
-  schedule: "0 13 * * WED,SUN"
-  jobTemplate:
-    spec:
-      template:
-        spec:
-          containers:
-          - name: email-stats
-            image: gethue/hue:latest
-            imagePullPolicy: IfNotPresent
-            args:
-            - /bin/bash
-            - -c
-            - ./build/env/bin/hue send_query_stats
-            volumeMounts:
-            - name: config-volume
-              mountPath: /usr/share/hue/desktop/conf/z-hue.ini
-              subPath: hue-ini
-            - name: config-volume-extra
-              mountPath: /usr/share/hue/desktop/conf/zz-hue.ini
-              subPath: hue-ini
-          restartPolicy: OnFailure
-          volumes:
-            - name: config-volume
-              configMap:
-                name: hue-config
-            - name: config-volume-extra
-              configMap:
-                name: hue-config-extra

+ 0 - 25
tools/kubernetes/yaml/hue/replicationcontroller.yaml

@@ -1,25 +0,0 @@
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: hue
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: hue
-    spec:
-      containers:
-        - name: hue
-          image: gethue/hue:latest
-          imagePullPolicy: Always
-          ports:
-            - containerPort: 8888
-          volumeMounts:
-          - name: config-volume
-            mountPath: /usr/share/hue/desktop/conf/z-hue.ini
-            subPath: hue-ini
-      volumes:
-        - name: config-volume
-          configMap:
-            name: hue-config

+ 0 - 11
tools/kubernetes/yaml/hue/service.yaml

@@ -1,11 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: hue
-spec:
-  selector:
-    app: hue
-  ports:
-  - name: hue
-    port: 8888
-  type: NodePort

+ 0 - 81
tools/kubernetes/yaml/nginx/deployment.yaml

@@ -1,81 +0,0 @@
-apiVersion: v1
-kind: ConfigMap
-metadata:
-  name: nginx-config
-data:
-  nginx.conf: |
-    server {
-        server_name hue;
-        charset utf-8;
-
-        listen 80;
-
-        # Or if running hue on https://
-        ## listen 8001 ssl;
-        ## ssl_certificate /path/to/ssl/cert;
-        ## ssl_certificate_key /path/to/ssl/key;
-
-        location / {
-            proxy_pass http://hue:8000;
-
-            # Or if the upstream Hue instances are running behind https://
-            ## proxy_pass https://hue;
-        }
-
-        location /static/ {
-            alias /usr/share/nginx/html/hue/static/;
-
-            expires 30d;
-            add_header Cache-Control public;
-        }
-    }
-
-    upstream hue {
-        ip_hash;
-
-        # List all the Hue instances here for high availability.
-        server hue:8000 max_fails=3;
-        #server HUE_HOST2:8888 max_fails=3;
-    }
----
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: nginx-deployment
-spec:
-  selector:
-    matchLabels:
-      app: nginx
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: nginx
-    spec:
-      containers:
-      - name: nginx
-        image: nginx:1.7.9
-        ports:
-        - containerPort: 80
-        volumeMounts:
-          - name: nginx-config
-            mountPath: /etc/nginx/nginx.conf
-            subPath: nginx.conff
-      volumes:
-        - name: nginx-config
-          configMap:
-            name: nginx-config
----
-apiVersion: v1
-kind: Service
-metadata:
-  name: hue-balancer
-spec:
-  type: NodePort
-  # type: LoadBalancer
-  selector:
-    app: nginx
-  ports:
-    - protocol: TCP
-      port: 80
-      targetPort: 80

+ 0 - 14
tools/kubernetes/yaml/postgres/pv-postgres.yaml

@@ -1,14 +0,0 @@
-kind: PersistentVolume
-apiVersion: v1
-metadata:
-  name: postgres-pv
-  labels:
-    type: local
-spec:
-  capacity:
-    storage: 2Gi
-  accessModes:
-    - ReadWriteOnce
-  storageClassName: microk8s-hostpath
-  hostPath:
-    path: /data/postgres-pv

+ 0 - 13
tools/kubernetes/yaml/postgres/pvc-postgres.yaml

@@ -1,13 +0,0 @@
-kind: PersistentVolumeClaim
-apiVersion: v1
-metadata:
-  name: postgres-pvc
-  labels:
-    type: local
-spec:
-  accessModes:
-    - ReadWriteOnce
-  resources:
-    requests:
-      storage: 2Gi
-  volumeName: postgres-pv

+ 0 - 42
tools/kubernetes/yaml/postgres/replicationcontroller-postgres.yaml

@@ -1,42 +0,0 @@
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: postgres-hue
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: postgres-hue
-    spec:
-      containers:
-        - name: postgres-hue
-          image: postgres:9.5
-          env:
-            - name: POSTGRES_USER
-              value: hue
-            - name: POSTGRES_PASSWORD
-              value: hue
-            - name: POSTGRES_DB
-              value: hue
-            - name: PGDATA
-              value: /var/lib/postgresql/data/pgdata
-            #   valueFrom:
-            #     secretKeyRef:
-            #       name: postgres-credentials
-            #       key: user
-
-            # - name: POSTGRES_PASSWORD
-            #   valueFrom:
-            #     secretKeyRef:
-            #       name: postgres-credentials
-            #       key: password
-          ports:
-            - containerPort: 5432
-          volumeMounts:
-            - name: postgres-data
-              mountPath: /var/lib/postgresql/data
-      volumes:
-        - name: postgres-data
-          persistentVolumeClaim:
-            claimName: postgres-pvc

+ 0 - 9
tools/kubernetes/yaml/postgres/secret-postgres.yaml

@@ -1,9 +0,0 @@
-apiVersion: v1
-kind: Secret
-metadata:
-  name: postgres-credentials
-type: Opaque
-data:
-  # echo -n 'xxx' | base64
-  user: aHVl
-  password: aHVl

+ 0 - 11
tools/kubernetes/yaml/postgres/service-postgres.yaml

@@ -1,11 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: postgres-hue
-spec:
-  ports:
-  - name: pgql
-    port: 5432
-  type: NodePort
-  selector:
-    app: postgres-hue

+ 0 - 23
tools/kubernetes/yaml/redis/deployment.yaml

@@ -1,23 +0,0 @@
-apiVersion: apps/v1
-kind: Deployment
-metadata:
-  name: redis
-spec:
-  selector:
-    matchLabels:
-      pod: redis
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        pod: redis
-    spec:
-      containers:
-      - name: master
-        image: redis
-        resources:
-          requests:
-            cpu: 100m
-            memory: 100Mi
-        ports:
-        - containerPort: 6379

+ 0 - 11
tools/kubernetes/yaml/redis/service.yaml

@@ -1,11 +0,0 @@
-apiVersion: v1
-kind: Service
-metadata:
-  name: redis
-spec:
-  selector:
-    pod: redis
-  ports:
-  - protocol: TCP
-    port: 6379
-    targetPort: 6379