staged next wave of operators to add and configure

This commit is contained in:
2025-08-01 13:43:38 -05:00
parent 4fd272ddf7
commit 7ffc2c983b
45 changed files with 1554 additions and 0 deletions

View File

@@ -0,0 +1,72 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: external-dns-cloudflare
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: external-dns
template:
metadata:
labels:
app: external-dns
spec:
serviceAccountName: external-dns
containers:
- name: cloudflare
image: registry.k8s.io/external-dns/external-dns:v0.15.0
args:
# - --source=service # ingress is also possible
- --source=ingress
- --ingress-class=nginx
- --domain-filter=mk-labs.cloud # (optional) limit to only example.com domains; change to match the zone created above.
- --provider=cloudflare
# - --cloudflare-proxied # (optional) enable the proxy feature of Cloudflare (DDOS protection, CDN...)
- --cloudflare-dns-records-per-page=5000 # (optional) configure how many DNS records to fetch per request
- --policy=sync # or upsert-only
env:
- name: CF_API_TOKEN
valueFrom:
secretKeyRef:
name: cloudflare-api-token
key: api-token
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: external-dns-cloudflare-monetnaildesign
spec:
strategy:
type: Recreate
selector:
matchLabels:
app: external-dns-monetnaildesign
template:
metadata:
labels:
app: external-dns-monetnaildesign
spec:
serviceAccountName: external-dns
containers:
- name: cloudflare
image: registry.k8s.io/external-dns/external-dns:v0.15.0
args:
# - --source=service # ingress is also possible
- --source=ingress
- --ingress-class=nginx
- --domain-filter=monetnaildesign.com # (optional) limit to only example.com domains; change to match the zone created above.
- --provider=cloudflare
# - --cloudflare-proxied # (optional) enable the proxy feature of Cloudflare (DDOS protection, CDN...)
- --cloudflare-dns-records-per-page=5000 # (optional) configure how many DNS records to fetch per request
- --policy=sync # or upsert-only
env:
- name: CF_API_TOKEN
valueFrom:
secretKeyRef:
name: cloudflare-api-token
key: api-token

View File

@@ -0,0 +1,33 @@
---
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: external-dns
finalizers:
- resources-finalizer.argocd.argoproj.io
annotations:
argocd.argoproj.io/sync-wave: "3"
spec:
destination:
name: in-cluster
namespace: external-dns
project: default
source:
path: 02-cluster-operators/external/external-dns
repoURL: git@github.com:rblundon/MK-Labs.git
targetRevision: HEAD
syncPolicy:
automated:
prune: false
selfHeal: true
syncOptions:
- RespectIgnoreDifferences=true
- CreateNamespace=true
managedNamespaceMetadata:
labels:
argocd.argoproj.io/managed-by: openshift-gitops
ignoreDifferences:
- group: apps
kind: Deployment
jsonPointers:
- /spec/replicas

View File

@@ -0,0 +1,15 @@
---
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: cloudflare-api-token # This is the secret name
namespace: external-dns
spec:
secretStoreRef:
kind: ClusterSecretStore
name: doppler-cluster
refreshInterval: "1h"
data:
- secretKey: api-token
remoteRef:
key: CLOUDFLARE_TOKEN

View File

@@ -0,0 +1,16 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
commonAnnotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
resources:
# Operator deployment
- namespace.yaml
- operatorgroup.yaml
- subscription.yaml
# Deploy cluster resources
- externalsecrets.yaml
- scc.yaml
- cloudflare.yaml

View File

@@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Namespace
metadata:
annotations:
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
name: external-dns-operator
labels:
argocd.argoproj.io/managed-by: openshift-gitops-operator
kubernetes.io/metadata.name: external-dns-operator
openshift.io/cluster-monitoring: 'true'
spec:
finalizers:
- kubernetes

View File

@@ -0,0 +1,9 @@
---
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
name: external-dns-operator
namespace: external-dns-operator
spec:
targetNamespaces:
- external-dns-operator

View File

@@ -0,0 +1,41 @@
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: external-dns
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: external-dns
rules:
- apiGroups: [""]
resources: ["services"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["get","watch","list"]
- apiGroups: ["networking","networking.k8s.io"]
resources: ["ingresses"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["nodes"]
verbs: ["get","watch","list"]
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get","watch","list"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: external-dns-viewer
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: external-dns
subjects:
- kind: ServiceAccount
name: external-dns
namespace: default

View File

@@ -0,0 +1,12 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: external-dns-operator
namespace: external-dns-operator
spec:
channel: stable-v1
installPlanApproval: Automatic
name: external-dns-operator
source: redhat-operators
sourceNamespace: openshift-marketplace