Browse Source

HUE-9003 [k8s] Move Hue from ReplicationControler to Deployment

Romain 6 years ago
parent
commit
8f055acbc8

+ 43 - 0
tools/kubernetes/helm/hue/templates/deployment-hue.yaml

@@ -0,0 +1,43 @@
+apiVersion: apps/v1beta2
+kind: Deployment
+metadata:
+  name: hue
+  labels:
+    deployment: hue
+spec:
+  selector:
+    matchLabels:
+      pod: hue
+  replicas: {{ .Values.hue.replicas }}
+  template:
+    metadata:
+      labels:
+        pod: hue
+    spec:
+      containers:
+      - name: hue
+        image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
+        imagePullPolicy: {{ .Values.image.pullPolicy }}
+        ports:
+          - containerPort: 8888
+        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
+        readinessProbe:
+          httpGet:
+            path: /desktop/debug/is_alive
+            port: 8888
+          initialDelaySeconds: 3
+          periodSeconds: 3
+          failureThreshold: 30
+      volumes:
+        - name: config-volume
+          configMap:
+            name: hue-config
+        - name: config-volume-extra
+          configMap:
+            name: hue-config-extra

+ 0 - 38
tools/kubernetes/helm/hue/templates/replicationcontroller-hue.yaml

@@ -1,38 +0,0 @@
-apiVersion: v1
-kind: ReplicationController
-metadata:
-  name: hue
-spec:
-  replicas: {{ .Values.hue.replicas }}
-  template:
-    metadata:
-      labels:
-        app: hue
-    spec:
-      containers:
-        - name: hue
-          image: {{ .Values.image.registry }}/hue:{{ .Values.image.tag }}
-          imagePullPolicy: {{ .Values.image.pullPolicy }}
-          ports:
-            - containerPort: 8888
-          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
-          readinessProbe:
-            httpGet:
-              path: /desktop/debug/is_alive
-              port: 8888
-            initialDelaySeconds: 3
-            periodSeconds: 3
-            failureThreshold: 30
-      volumes:
-        - name: config-volume
-          configMap:
-            name: hue-config
-        - name: config-volume-extra
-          configMap:
-            name: hue-config-extra

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

@@ -3,10 +3,10 @@ kind: Service
 metadata:
   name: hue
   labels:
-    app: hue
+    pod: hue
 spec:
   selector:
-    app: hue
+    pod: hue
   ports:
   - name: hue
     port: 8888