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

chore: switch external-dns chart #1440

Merged
merged 1 commit into from
Dec 31, 2024
Merged

chore: switch external-dns chart #1440

merged 1 commit into from
Dec 31, 2024

Conversation

bo0tzz
Copy link
Owner

@bo0tzz bo0tzz commented Dec 31, 2024

No description provided.

Copy link

--- . Kustomization: flux-system/flux-system HelmRepository: dns/external-dns

+++ . Kustomization: flux-system/flux-system HelmRepository: dns/external-dns

@@ -3,8 +3,8 @@

 kind: HelmRepository
 metadata:
   name: external-dns
   namespace: dns
 spec:
   interval: 1h
-  url: https://charts.bitnami.com/bitnami
+  url: https://kubernetes-sigs.github.io/external-dns/
 
--- . Kustomization: flux-system/flux-system HelmRelease: dns/external-dns

+++ . Kustomization: flux-system/flux-system HelmRelease: dns/external-dns

@@ -6,22 +6,27 @@

   namespace: dns
 spec:
   interval: 1h
   chart:
     spec:
       chart: external-dns
-      version: 8.6.1
+      version: 1.15.0
       sourceRef:
         kind: HelmRepository
         name: external-dns
         namespace: dns
       interval: 1h
   values:
+    provider:
+      name: cloudflare
     sources:
     - ingress
-    provider: cloudflare
     policy: sync
-    cloudflare:
-      proxied: false
-      secretName: cloudflare-api-token
-    annotationFilter: external-dns.alpha.kubernetes.io/exclude notin (true)
+    extraArgs:
+    - --annotation-filter=external-dns.alpha.kubernetes.io/exclude notin (true)
+    env:
+    - name: CF_API_TOKEN
+      valueFrom:
+        secretKeyRef:
+          name: cloudflare-api-token
+          key: cloudflare_api_token
 

Copy link

--- . HelmRelease: dns/external-dns Service: dns/external-dns

+++ . HelmRelease: dns/external-dns Service: dns/external-dns

@@ -2,21 +2,20 @@

 apiVersion: v1
 kind: Service
 metadata:
   name: external-dns
   namespace: dns
   labels:
+    app.kubernetes.io/name: external-dns
     app.kubernetes.io/instance: external-dns
     app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
 spec:
   type: ClusterIP
-  sessionAffinity: None
+  selector:
+    app.kubernetes.io/name: external-dns
+    app.kubernetes.io/instance: external-dns
   ports:
   - name: http
     port: 7979
+    targetPort: http
     protocol: TCP
-    targetPort: http
-  selector:
-    app.kubernetes.io/instance: external-dns
-    app.kubernetes.io/name: external-dns
 
--- . HelmRelease: dns/external-dns NetworkPolicy: dns/external-dns

+++ . HelmRelease: dns/external-dns NetworkPolicy: dns/external-dns

@@ -1,25 +0,0 @@

----
-kind: NetworkPolicy
-apiVersion: networking.k8s.io/v1
-metadata:
-  name: external-dns
-  namespace: dns
-  labels:
-    app.kubernetes.io/instance: external-dns
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
-    app.kubernetes.io/component: controller
-spec:
-  podSelector:
-    matchLabels:
-      app.kubernetes.io/instance: external-dns
-      app.kubernetes.io/name: external-dns
-  policyTypes:
-  - Ingress
-  - Egress
-  egress:
-  - {}
-  ingress:
-  - ports:
-    - port: 7979
-
--- . HelmRelease: dns/external-dns ClusterRoleBinding: dns/external-dns-viewer

+++ . HelmRelease: dns/external-dns ClusterRoleBinding: dns/external-dns-viewer

@@ -0,0 +1,18 @@

+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  name: external-dns-viewer
+  labels:
+    app.kubernetes.io/name: external-dns
+    app.kubernetes.io/instance: external-dns
+    app.kubernetes.io/managed-by: Helm
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: external-dns
+subjects:
+- kind: ServiceAccount
+  name: external-dns
+  namespace: dns
+
--- . HelmRelease: dns/external-dns ClusterRole: dns/external-dns-dns

+++ . HelmRelease: dns/external-dns ClusterRole: dns/external-dns-dns

@@ -1,113 +0,0 @@

----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRole
-metadata:
-  name: external-dns-dns
-  labels:
-    app.kubernetes.io/instance: external-dns
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
-rules:
-- apiGroups:
-  - ''
-  resources:
-  - services
-  - pods
-  - nodes
-  - endpoints
-  - namespaces
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - extensions
-  - networking.k8s.io
-  - getambassador.io
-  resources:
-  - ingresses
-  - hosts
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - route.openshift.io
-  resources:
-  - routes
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - networking.istio.io
-  resources:
-  - gateways
-  - virtualservices
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - zalando.org
-  resources:
-  - routegroups
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - zalando.org
-  resources:
-  - routegroups/status
-  verbs:
-  - patch
-  - update
-- apiGroups:
-  - projectcontour.io
-  resources:
-  - httpproxies
-  verbs:
-  - get
-  - watch
-  - list
-- apiGroups:
-  - gloo.solo.io
-  - gateway.solo.io
-  resources:
-  - proxies
-  - virtualservices
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - configuration.konghq.com
-  resources:
-  - tcpingresses
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - gateway.networking.k8s.io
-  resources:
-  - gateways
-  - httproutes
-  - tlsroutes
-  - tcproutes
-  - udproutes
-  - grpcroutes
-  verbs:
-  - get
-  - list
-  - watch
-- apiGroups:
-  - cis.f5.com
-  resources:
-  - virtualservers
-  verbs:
-  - get
-  - watch
-  - list
-
--- . HelmRelease: dns/external-dns PodDisruptionBudget: dns/external-dns

+++ . HelmRelease: dns/external-dns PodDisruptionBudget: dns/external-dns

@@ -1,17 +0,0 @@

----
-apiVersion: policy/v1
-kind: PodDisruptionBudget
-metadata:
-  name: external-dns
-  namespace: dns
-  labels:
-    app.kubernetes.io/instance: external-dns
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
-spec:
-  maxUnavailable: 1
-  selector:
-    matchLabels:
-      app.kubernetes.io/instance: external-dns
-      app.kubernetes.io/name: external-dns
-
--- . HelmRelease: dns/external-dns ClusterRoleBinding: dns/external-dns-dns

+++ . HelmRelease: dns/external-dns ClusterRoleBinding: dns/external-dns-dns

@@ -1,18 +0,0 @@

----
-apiVersion: rbac.authorization.k8s.io/v1
-kind: ClusterRoleBinding
-metadata:
-  name: external-dns-dns
-  labels:
-    app.kubernetes.io/instance: external-dns
-    app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
-roleRef:
-  apiGroup: rbac.authorization.k8s.io
-  kind: ClusterRole
-  name: external-dns-dns
-subjects:
-- kind: ServiceAccount
-  name: external-dns
-  namespace: dns
-
--- . HelmRelease: dns/external-dns ServiceAccount: dns/external-dns

+++ . HelmRelease: dns/external-dns ServiceAccount: dns/external-dns

@@ -2,11 +2,11 @@

 apiVersion: v1
 kind: ServiceAccount
 metadata:
   name: external-dns
   namespace: dns
   labels:
+    app.kubernetes.io/name: external-dns
     app.kubernetes.io/instance: external-dns
     app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
-automountServiceAccountToken: false
+automountServiceAccountToken: null
 
--- . HelmRelease: dns/external-dns ClusterRole: dns/external-dns

+++ . HelmRelease: dns/external-dns ClusterRole: dns/external-dns

@@ -0,0 +1,20 @@

+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  name: external-dns
+  labels:
+    app.kubernetes.io/name: external-dns
+    app.kubernetes.io/instance: external-dns
+    app.kubernetes.io/managed-by: Helm
+rules:
+- apiGroups:
+  - extensions
+  - networking.k8s.io
+  resources:
+  - ingresses
+  verbs:
+  - get
+  - watch
+  - list
+
--- . HelmRelease: dns/external-dns Deployment: dns/external-dns

+++ . HelmRelease: dns/external-dns Deployment: dns/external-dns

@@ -2,123 +2,81 @@

 apiVersion: apps/v1
 kind: Deployment
 metadata:
   name: external-dns
   namespace: dns
   labels:
+    app.kubernetes.io/name: external-dns
     app.kubernetes.io/instance: external-dns
     app.kubernetes.io/managed-by: Helm
-    app.kubernetes.io/name: external-dns
 spec:
-  revisionHistoryLimit: 10
   replicas: 1
   selector:
     matchLabels:
+      app.kubernetes.io/name: external-dns
       app.kubernetes.io/instance: external-dns
-      app.kubernetes.io/name: external-dns
+  strategy:
+    type: Recreate
   template:
     metadata:
       labels:
+        app.kubernetes.io/name: external-dns
         app.kubernetes.io/instance: external-dns
-        app.kubernetes.io/managed-by: Helm
-        app.kubernetes.io/name: external-dns
     spec:
+      serviceAccountName: external-dns
       securityContext:
-        fsGroup: 1001
-        fsGroupChangePolicy: Always
-        supplementalGroups: []
-        sysctls: []
-      affinity:
-        podAffinity: null
-        podAntiAffinity:
-          preferredDuringSchedulingIgnoredDuringExecution:
-          - podAffinityTerm:
-              labelSelector:
-                matchLabels:
-                  app.kubernetes.io/instance: external-dns
-                  app.kubernetes.io/name: external-dns
-              topologyKey: kubernetes.io/hostname
-            weight: 1
-        nodeAffinity: null
-      automountServiceAccountToken: true
-      serviceAccountName: external-dns
+        fsGroup: 65534
+        runAsNonRoot: true
+        seccompProfile:
+          type: RuntimeDefault
       containers:
       - name: external-dns
-        image: docker.io/bitnami/external-dns:0.15.0-debian-12-r6
-        imagePullPolicy: IfNotPresent
-        args:
-        - --metrics-address=:7979
-        - --log-level=info
-        - --log-format=text
-        - --policy=sync
-        - --provider=cloudflare
-        - --registry=txt
-        - --interval=1m
-        - --annotation-filter=external-dns.alpha.kubernetes.io/exclude notin (true)
-        - --source=ingress
-        - --cloudflare-dns-records-per-page=100
-        env:
-        - name: CF_API_TOKEN
-          valueFrom:
-            secretKeyRef:
-              name: cloudflare-api-token
-              key: cloudflare_api_token
-              optional: true
-        - name: CF_API_KEY
-          valueFrom:
-            secretKeyRef:
-              name: cloudflare-api-token
-              key: cloudflare_api_key
-              optional: true
-        - name: CF_API_EMAIL
-          value: ''
-        envFrom: null
-        ports:
-        - name: http
-          containerPort: 7979
-        livenessProbe:
-          tcpSocket:
-            port: http
-          initialDelaySeconds: 10
-          periodSeconds: 10
-          timeoutSeconds: 5
-          successThreshold: 1
-          failureThreshold: 2
-        readinessProbe:
-          httpGet:
-            path: /healthz
-            port: http
-          initialDelaySeconds: 5
-          periodSeconds: 10
-          timeoutSeconds: 5
-          successThreshold: 1
-          failureThreshold: 6
         securityContext:
           allowPrivilegeEscalation: false
           capabilities:
             drop:
             - ALL
           privileged: false
           readOnlyRootFilesystem: true
-          runAsGroup: 1001
+          runAsGroup: 65532
           runAsNonRoot: true
-          runAsUser: 1001
-          seLinuxOptions: {}
-          seccompProfile:
-            type: RuntimeDefault
-        resources:
-          limits:
-            cpu: 150m
-            ephemeral-storage: 2Gi
-            memory: 192Mi
-          requests:
-            cpu: 100m
-            ephemeral-storage: 50Mi
-            memory: 128Mi
-        volumeMounts:
-        - name: empty-dir
-          mountPath: /tmp
-          subPath: tmp-dir
-      volumes:
-      - name: empty-dir
-        emptyDir: {}
+          runAsUser: 65532
+        image: registry.k8s.io/external-dns/external-dns:v0.15.0
+        imagePullPolicy: IfNotPresent
+        env:
+        - name: CF_API_TOKEN
+          valueFrom:
+            secretKeyRef:
+              key: cloudflare_api_token
+              name: cloudflare-api-token
+        args:
+        - --log-level=info
+        - --log-format=text
+        - --interval=1m
+        - --source=ingress
+        - --policy=sync
+        - --registry=txt
+        - --provider=cloudflare
+        - --annotation-filter=external-dns.alpha.kubernetes.io/exclude notin (true)
+        ports:
+        - name: http
+          protocol: TCP
+          containerPort: 7979
+        livenessProbe:
+          failureThreshold: 2
+          httpGet:
+            path: /healthz
+            port: http
+          initialDelaySeconds: 10
+          periodSeconds: 10
+          successThreshold: 1
+          timeoutSeconds: 5
+        readinessProbe:
+          failureThreshold: 6
+          httpGet:
+            path: /healthz
+            port: http
+          initialDelaySeconds: 5
+          periodSeconds: 10
+          successThreshold: 1
+          timeoutSeconds: 5
 

@bo0tzz bo0tzz merged commit 101d652 into main Dec 31, 2024
2 checks passed
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