Skip to content

Commit

Permalink
feat: convert operators to ArgoCD ApplicationSet
Browse files Browse the repository at this point in the history
Convert the operators to being deployed by an ArgoCD ApplicationSet.
  • Loading branch information
cardoe committed Jun 26, 2024
1 parent 8e22164 commit dd7420a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 78 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ spec:
- '*'
destinations:
# make sure our operators don't install in the wrong place
- namespace: '!nautobot'
- namespace: 'rabbitmq-system'
server: '*'
- namespace: '!openstack'
- namespace: 'mariadb-operator'
server: '*'
- namespace: 'postgres-operator'
server: '*'
clusterResourceWhitelist:
- group: '*'
Expand Down
37 changes: 37 additions & 0 deletions apps/appsets/operators/operators.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: argoproj.io/v1alpha1
kind: ApplicationSet
metadata:
name: operators
spec:
goTemplate: true
goTemplateOptions: ["missingkey=error"]
generators:
- matrix:
generators:
- clusters:
selector:
matchLabels:
argocd.argoproj.io/secret-type: cluster
- git:
repoURL: '{{index .metadata.annotations "uc_repo_git_url"}}'
revision: '{{index .metadata.annotations "uc_repo_ref"}}'
directories:
- path: operators/*
template:
metadata:
name: '{{.name}}-{{.path.basename}}'
spec:
project: operators
source:
repoURL: '{{index .metadata.annotations "uc_repo_git_url"}}'
targetRevision: '{{index .metadata.annotations "uc_repo_ref"}}'
path: '{{.path.path}}'
destination:
server: '{{.server}}'
namespace: '{{.path.basename}}'
syncPolicy:
automated:
selfHeal: true
syncOptions:
- CreateNamespace=true
- ServerSideApply=true
19 changes: 0 additions & 19 deletions apps/operators/mariadb-operator.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions apps/operators/messaging-topology-operator.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions apps/operators/postgres-operator.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions apps/operators/rabbitmq-operator.yaml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ kind: Kustomization

resources:
- https://github.com/rabbitmq/cluster-operator/releases/latest/download/cluster-operator.yml
- https://github.com/rabbitmq/messaging-topology-operator/releases/download/v1.13.0/messaging-topology-operator-with-certmanager.yaml

0 comments on commit dd7420a

Please sign in to comment.