Răsfoiți Sursa

HUE-8744 [k8s] Clean-up charts and add missing image and replica values

Romain 6 ani în urmă
părinte
comite
2bfde3054e

+ 2 - 2
tools/kubernetes/helm/hue/templates/deployment-celery-beat.yaml

@@ -17,8 +17,8 @@ spec:
     spec:
       containers:
         - name: celery-beat
-          image: {{ .Values.registry }}/hue:{{ .Values.tag }}
-          imagePullPolicy: Always
+          image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
           command: ['./build/env/bin/celery', 'beat', '-A', 'desktop', '-l', 'info']
           volumeMounts:
           - name: config-volume

+ 2 - 2
tools/kubernetes/helm/hue/templates/deployment-celery-workers.yaml

@@ -17,8 +17,8 @@ spec:
     spec:
       containers:
         - name: celery-worker
-          image: {{ .Values.registry }}/hue:{{ .Values.tag }}
-          imagePullPolicy: Always
+          image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
           command: ['./build/env/bin/celery', 'worker', '-A', 'desktop', '-l', 'info']
           volumeMounts:
           - name: config-volume

+ 2 - 1
tools/kubernetes/helm/hue/templates/deployment-nginx.yaml

@@ -55,7 +55,8 @@ spec:
     spec:
       containers:
       - name: nginx
-        image: {{ .Values.registry }}/nginx:{{ .Values.tag }}
+        image: {{ .Values.image.registry }}/nginx:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
         ports:
         - containerPort: 80
         volumeMounts:

+ 0 - 33
tools/kubernetes/helm/hue/templates/replicationcontroller-database-postgres.yaml

@@ -1,33 +0,0 @@
-{{- if .Values.hue.database.create -}}
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: hue-postgres
-spec:
-  replicas: 1
-  template:
-    metadata:
-      labels:
-        app: hue-postgres
-    spec:
-      containers:
-        - name: hue-postgres
-          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
-          ports:
-            - containerPort: 5432
-          volumeMounts:
-            - mountPath: /var/lib/postgresql/data
-              name: pg-data
-      volumes:
-        - name: pg-data
-          emptyDir: {}
-{{- end -}}

+ 2 - 2
tools/kubernetes/helm/hue/templates/replicationcontroller-hue.yaml

@@ -11,8 +11,8 @@ spec:
     spec:
       containers:
         - name: hue
-          image: {{ .Values.registry }}/hue:{{ .Values.tag }}
-          imagePullPolicy: Always
+          image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
+          imagePullPolicy: {{ .Values.image.pullPolicy }}
           ports:
             - containerPort: 8888
           volumeMounts:

+ 0 - 13
tools/kubernetes/helm/hue/templates/service-database-postgres.yaml

@@ -1,13 +0,0 @@
-{{- if .Values.hue.database.create -}}
-apiVersion: v1
-kind: Service
-metadata:
-  name: hue-postgres
-spec:
-  ports:
-  - name: pgql
-    port: 5432
-  type: NodePort
-  selector:
-    app: hue-postgres
-{{- end -}}

+ 10 - 4
tools/kubernetes/helm/hue/values.yaml

@@ -1,6 +1,9 @@
-registry: "gethue"
-tag: "latest"
+image:
+   registry: "gethue"
+   tag: "latest"
+   pullPolicy: "IfNotPresent"
 hue:
+  replicas: 1
   database:
     create: true
     engine: "postgresql_psycopg2"
@@ -16,14 +19,17 @@ hue:
     [[[mysql]]]
       name = MySQL
       interface=sqlalchemy
-      options='{"url": "mysql://hue:datasshue@romain:3306/hue"}'
+      options='{"url": "mysql://hue:datasshue@romain2:3306/hue"}'
     [[[postgresql]]]
       name = postgresql
       interface=sqlalchemy
-      options='{"url": "postgresql://hue:hue@hue-postgres:30445/hue"}'
+      options='{"url": "postgresql://hue:hue@hue-postgres:5432/hue"}'
+
+
   ini: |
     [desktop]
     app_blacklist=filebrowser,search,hbase,security,jobbrowser,metastore
+    django_debug_mode=true
 
     [[task_server]]
     enabled=true