Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aircon): migrate to app-template v2 #2167

Merged
merged 3 commits into from
Nov 27, 2023

Conversation

tyriis
Copy link
Owner

@tyriis tyriis commented Nov 27, 2023

No description provided.

@tyriis-automation
Copy link
Contributor

tyriis-automation bot commented Nov 27, 2023

--- kubernetes/talos-flux/apps/home-automation/aircon/app Kustomization: flux-system/apps-aircon HelmRelease: home-automation/aircon

+++ kubernetes/talos-flux/apps/home-automation/aircon/app Kustomization: flux-system/apps-aircon HelmRelease: home-automation/aircon

@@ -13,13 +13,13 @@

       chart: app-template
       interval: 15m
       sourceRef:
         kind: HelmRepository
         name: bjw-s-charts
         namespace: flux-system
-      version: 1.5.1
+      version: 2.2.0
   install:
     createNamespace: true
     remediation:
       retries: 3
   interval: 15m
   maxHistory: 15
@@ -27,36 +27,39 @@

     keepHistory: false
   upgrade:
     cleanupOnFail: true
     remediation:
       retries: 3
   values:
-    env:
-      TZ: ${SETTING_TZ}
-    hostNetwork: true
-    image:
-      repository: deiger/aircon
-      tag: 0.3.17
+    controllers:
+      main:
+        annotations:
+          secret.reloader.stakater.com/reload: aircon-options
+        containers:
+          main:
+            env:
+              TZ: ${SETTING_TZ}
+            image:
+              repository: deiger/aircon
+              tag: 0.3.17
+            resources:
+              limits:
+                memory: 2048Mi
+              requests:
+                cpu: 100m
+                memory: 300Mi
+    defaultPodOptions:
+      hostNetwork: true
     persistence:
       options:
         enabled: true
-        subPath:
-        - mountPath: /data/options.json
-          path: options.json
-        type: custom
-        volumeSpec:
-          secret:
-            secretName: aircon-options
-    podAnnotations:
-      secret.reloader.stakater.com/reload: aircon-options
-    resources:
-      limits:
-        memory: 2048Mi
-      requests:
-        cpu: 100m
-        memory: 300Mi
+        globalMounts:
+        - path: /data/options.json
+          subPath: options.json
+        name: aircon-options
+        type: secret
     service:
       main:
         ports:
           http:
             port: 8888
 

@tyriis-automation
Copy link
Contributor

tyriis-automation bot commented Nov 27, 2023

--- kubernetes HelmRelease: home-automation/aircon Service: home-automation/aircon

+++ kubernetes HelmRelease: home-automation/aircon Service: home-automation/aircon

@@ -1,21 +1,22 @@

 ---
 apiVersion: v1
 kind: Service
 metadata:
   name: aircon
   labels:
-    app.kubernetes.io/service: aircon
     app.kubernetes.io/instance: aircon
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: aircon
+    app.kubernetes.io/service: aircon
 spec:
   type: ClusterIP
   ports:
   - port: 8888
-    targetPort: http
+    targetPort: 8888
     protocol: TCP
     name: http
   selector:
+    app.kubernetes.io/component: main
     app.kubernetes.io/instance: aircon
     app.kubernetes.io/name: aircon
 
--- kubernetes HelmRelease: home-automation/aircon Deployment: home-automation/aircon

+++ kubernetes HelmRelease: home-automation/aircon Deployment: home-automation/aircon

@@ -1,78 +1,78 @@

 ---
 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: aircon
   labels:
+    app.kubernetes.io/component: main
     app.kubernetes.io/instance: aircon
     app.kubernetes.io/managed-by: Helm
     app.kubernetes.io/name: aircon
+  annotations:
+    secret.reloader.stakater.com/reload: aircon-options
 spec:
   revisionHistoryLimit: 3
   replicas: 1
   strategy:
     type: Recreate
   selector:
     matchLabels:
+      app.kubernetes.io/component: main
       app.kubernetes.io/name: aircon
       app.kubernetes.io/instance: aircon
   template:
     metadata:
-      annotations:
-        secret.reloader.stakater.com/reload: aircon-options
       labels:
+        app.kubernetes.io/component: main
+        app.kubernetes.io/instance: aircon
         app.kubernetes.io/name: aircon
-        app.kubernetes.io/instance: aircon
     spec:
+      enableServiceLinks: true
       serviceAccountName: default
       automountServiceAccountToken: true
+      hostIPC: false
       hostNetwork: true
+      hostPID: false
       dnsPolicy: ClusterFirstWithHostNet
-      enableServiceLinks: true
       containers:
-      - name: aircon
-        image: deiger/aircon:0.3.17
-        imagePullPolicy: null
-        env:
+      - env:
         - name: TZ
           value: ${SETTING_TZ}
-        ports:
-        - name: http
-          containerPort: 8888
-          protocol: TCP
-        volumeMounts:
-        - name: options
-          subPath: options.json
-          mountPath: /data/options.json
+        image: deiger/aircon:0.3.17
         livenessProbe:
           failureThreshold: 3
           initialDelaySeconds: 0
           periodSeconds: 10
           tcpSocket:
             port: 8888
           timeoutSeconds: 1
+        name: main
         readinessProbe:
           failureThreshold: 3
           initialDelaySeconds: 0
           periodSeconds: 10
-          tcpSocket:
-            port: 8888
-          timeoutSeconds: 1
-        startupProbe:
-          failureThreshold: 30
-          initialDelaySeconds: 0
-          periodSeconds: 5
           tcpSocket:
             port: 8888
           timeoutSeconds: 1
         resources:
           limits:
             memory: 2048Mi
           requests:
             cpu: 100m
             memory: 300Mi
+        startupProbe:
+          failureThreshold: 30
+          initialDelaySeconds: 0
+          periodSeconds: 5
+          tcpSocket:
+            port: 8888
+          timeoutSeconds: 1
+        volumeMounts:
+        - mountPath: /data/options.json
+          name: options
+          subPath: options.json
       volumes:
       - name: options
         secret:
           secretName: aircon-options
 

@tyriis-automation
Copy link
Contributor

tyriis-automation bot commented Nov 27, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ EDITORCONFIG editorconfig-checker 1 0 0.01s
✅ REPOSITORY gitleaks yes no 1.55s
✅ YAML prettier 1 0 0.41s
✅ YAML yamllint 1 0 0.25s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@tyriis tyriis merged commit 5322388 into main Nov 27, 2023
8 checks passed
@tyriis tyriis deleted the feature/app-template-v2-migration branch November 27, 2023 22:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant