2 Commits 6a5d1e30d6 ... 410ff19a11

Auteur SHA1 Message Date
  Oleg Pykhalov 410ff19a11 infrastructure: base: isc-dhcp: Add fallback. il y a 3 mois
  Oleg Pykhalov 64bddd11ab apps: base: workstation: pod: Busybox specify imagePullPolicy. il y a 3 mois

+ 1 - 0
apps/base/workstation/pod.yaml

@@ -16,6 +16,7 @@ spec:
   initContainers:
   - name: volume-mount-hack
     image: busybox
+    imagePullPolicy: IfNotPresent
     command:
     - sh
     - -c

+ 2 - 1
infrastructure/base/isc-dhcp/kustomization.yaml

@@ -3,4 +3,5 @@ kind: Kustomization
 namespace: isc-dhcp
 resources:
 - namespace.yaml
-- daemonset.yaml
+- primary-daemonset.yaml
+- secondary-daemonset.yaml

+ 5 - 5
infrastructure/base/isc-dhcp/daemonset.yaml

@@ -1,16 +1,16 @@
 apiVersion: apps/v1
 kind: DaemonSet
 metadata:
-  name: isc-dhcp
+  name: isc-dhcp-primary
 spec:
   selector:
     matchLabels:
-      app.kubernetes.io/name: isc-dhcp
+      app.kubernetes.io/name: isc-dhcp-primary
       app.kubernetes.io/part-of: isc-dhcp
   template:
     metadata:
       labels:
-        app.kubernetes.io/name: isc-dhcp
+        app.kubernetes.io/name: isc-dhcp-primary
         app.kubernetes.io/part-of: isc-dhcp
     spec:
       affinity:
@@ -18,7 +18,7 @@ spec:
           requiredDuringSchedulingIgnoredDuringExecution:
             nodeSelectorTerms:
             - matchExpressions:
-              - key: isc-dhcp.cluster.local/schedulable
+              - key: isc-dhcp-primary.cluster.local/schedulable
                 operator: In
                 values:
                 - "true"
@@ -34,4 +34,4 @@ spec:
       volumes:
       - name: config
         configMap:
-          name: isc-dhcp-configuration
+          name: isc-dhcp-primary-configuration

+ 37 - 0
infrastructure/base/isc-dhcp/secondary-daemonset.yaml

@@ -0,0 +1,37 @@
+apiVersion: apps/v1
+kind: DaemonSet
+metadata:
+  name: isc-dhcp-secondary
+spec:
+  selector:
+    matchLabels:
+      app.kubernetes.io/name: isc-dhcp-secondary
+      app.kubernetes.io/part-of: isc-dhcp
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/name: isc-dhcp-secondary
+        app.kubernetes.io/part-of: isc-dhcp
+    spec:
+      affinity:
+        nodeAffinity:
+          requiredDuringSchedulingIgnoredDuringExecution:
+            nodeSelectorTerms:
+            - matchExpressions:
+              - key: isc-dhcp-secondary.cluster.local/schedulable
+                operator: In
+                values:
+                - "true"
+      hostNetwork: true
+      containers:
+      - image: harbor.home.wugi.info/library/isc-dhcp:0633b40c
+        name: guix
+        volumeMounts:
+        - mountPath: /etc/dhcpd.conf
+          subPath: dhcpd.conf
+          readOnly: true
+          name: config
+      volumes:
+      - name: config
+        configMap:
+          name: isc-dhcp-secondary-configuration