diff --git a/argocd/applications/mongodb-operator.yaml b/argocd/applications/mongodb-operator.yaml new file mode 100644 index 0000000..270d0c0 --- /dev/null +++ b/argocd/applications/mongodb-operator.yaml @@ -0,0 +1,21 @@ +--- +apiVersion: argoproj.io/v1alpha1 +kind: Application +metadata: + name: mongodb-operator + namespace: argocd +spec: + project: k-space.ee + source: + # also depends on git@git.k-space.ee:secretspace/kube.git + repoURL: git@git.k-space.ee:k-space/kube.git + targetRevision: HEAD + path: mongodb-operator + destination: + server: 'https://kubernetes.default.svc' + namespace: mongodb-operator + # syncPolicy: + # automated: + # prune: true + syncOptions: + - CreateNamespace=true diff --git a/mongodb-operator/.gitignore b/mongodb-operator/.gitignore deleted file mode 100644 index 3bed397..0000000 --- a/mongodb-operator/.gitignore +++ /dev/null @@ -1 +0,0 @@ -application.yml diff --git a/mongodb-operator/README.md b/mongodb-operator/README.md index 413f488..8bfa4fd 100644 --- a/mongodb-operator/README.md +++ b/mongodb-operator/README.md @@ -1,13 +1,13 @@ # MongoDB Community Kubernetes Operator -To update operator itself: +## Derployment +With ArgoCD. Render it locally: + +```sh +kustomize build . --enable-helm ``` -helm repo add mongodb https://mongodb.github.io/helm-charts -helm template -n mongodb-operator community-operator mongodb/community-operator -f values.yaml > application.yml -kubectl create namespace mongodb-operator -kubectl apply -f application.yml -``` + To update RBAC rules: diff --git a/mongodb-operator/kustomization.yaml b/mongodb-operator/kustomization.yaml new file mode 100644 index 0000000..88322b9 --- /dev/null +++ b/mongodb-operator/kustomization.yaml @@ -0,0 +1,13 @@ +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization + +namespace: mongodb-operator + +# spec: https://kubectl.docs.kubernetes.io/references/kustomize/builtins/#_helmchartinflationgenerator_ +helmCharts: +- includeCRDs: true + name: &name community-operator + releaseName: *name + repo: https://mongodb.github.io/helm-charts + valuesFile: values.yaml + version: 0.10.0 # helm search repo mongodb/community-operator --versions