Skip to content

Commit

Permalink
enable helm for kustomize
Browse files Browse the repository at this point in the history
  • Loading branch information
diogosilva30 committed Nov 12, 2024
1 parent ac28023 commit 17cfccc
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 67 deletions.
11 changes: 1 addition & 10 deletions bootstrap/argo-cd.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
creationTimestamp: null
labels:
app.kubernetes.io/managed-by: argocd-autopilot
app.kubernetes.io/name: argo-cd
Expand Down Expand Up @@ -37,12 +36,4 @@ spec:
# lastAppliedConfig annotation
# https://argo-cd.readthedocs.io/en/stable/user-guide/sync-options/#server-side-apply
- ServerSideApply=true
status:
health: {}
summary: {}
sync:
comparedTo:
destination: {}
source:
repoURL: ""
status: ""

98 changes: 41 additions & 57 deletions bootstrap/argo-cd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,33 +3,17 @@ namespace: argocd
apiVersion: kustomize.config.k8s.io/v1beta1

# configMapGenerator:
# - behavior: merge
# name: argocd-cm
# - behavior: create
# name: argocd-cmd-params-cm
# namespace: argocd
# literals:
# - kustomize.buildOptions=--enable-alpha-plugins --enable-helm --load-restrictor LoadRestrictionsNone
# # Enable web terminal to exec into pods
# # https://argo-cd.readthedocs.io/en/stable/operator-manual/web_based_terminal/
# - exec.enabled="true"
# - timeout.reconciliation=15s
# # Need to specify URL of argo, otherwise we get error on OIDC:
# # https://github.com/argoproj/argo-helm/issues/1593
# - url="https://argo.lab.local"
# # Configure OIDC authentication
# # https://argo-cd.readthedocs.io/en/stable/operator-manual/user-management/#existing-oidc-provider
# - |
# oidc.config=
# name: Keycloak Shared Services
# issuer: https://idp.dsilva.dev/realms/master
# clientID: argocd
# clientSecret: $oidc.keycloak.clientSecret
# requestedScopes: ["openid", "profile", "email", "groups"]
# redirectURL: https://argo.lab.local/
# # Disable HTTPS redirection
# - server.insecure="true"

resources:
# Prometheus operator CRDs
- https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/v0.75.2/bundle.yaml
- manifests/ingress.yaml
# - manifests/ingress.yaml
- manifests/service-monitors.yaml
# ArgoCD Image Updater
- https://raw.githubusercontent.com/argoproj-labs/argocd-image-updater/stable/manifests/install.yaml
Expand All @@ -38,41 +22,41 @@ resources:
# as annotations (check `kustomize.commonAnnotations` in `project/common.yaml`).
# So we just need to make a kustomize replacement of the value we want to replace
# with the annotation value
replacements:
- source:
kind: Ingress
name: argocd-ingress
fieldPath: metadata.annotations.dns
targets:
- select:
kind: Ingress
name: argocd-ingress
fieldPaths:
- spec.rules.0.host
options:
# This keeps the "argo." prefix
delimiter: "."
index: 1
# replacements:
# - source:
# kind: Ingress
# name: argocd-ingress
# fieldPath: metadata.annotations.dns
# targets:
# - select:
# kind: Ingress
# name: argocd-ingress
# fieldPaths:
# - spec.rules.0.host
# options:
# # This keeps the "argo." prefix
# delimiter: "."
# index: 1

# Add the patch to the deployment
patches:
# https://argo-cd.readthedocs.io/en/stable/operator-manual/custom_tools/
- target:
kind: Deployment
name: argocd-repo-server
path: manifests/repo-server-deployment-patch.yaml
- target:
kind: Role
name: argocd-server
path: manifests/web-terminal-permission-patch.yaml
# # Add the patch to the deployment
# patches:
# # https://argo-cd.readthedocs.io/en/stable/operator-manual/custom_tools/
# - target:
# kind: Deployment
# name: argocd-repo-server
# path: manifests/repo-server-deployment-patch.yaml
# - target:
# kind: Role
# name: argocd-server
# path: manifests/web-terminal-permission-patch.yaml

# reset the crbs to `subject.namespace: default`, so that argo-cd will later change them to the actual ns
# From https://github.com/argoproj-labs/argocd-autopilot/blob/main/manifests/ha/kustomization.yaml
- target:
group: rbac.authorization.k8s.io
version: v1
kind: ClusterRoleBinding
patch: |-
- op: replace
path: /subjects/0/namespace
value: default
# # reset the crbs to `subject.namespace: default`, so that argo-cd will later change them to the actual ns
# # From https://github.com/argoproj-labs/argocd-autopilot/blob/main/manifests/ha/kustomization.yaml
# - target:
# group: rbac.authorization.k8s.io
# version: v1
# kind: ClusterRoleBinding
# patch: |-
# - op: replace
# path: /subjects/0/namespace
# value: default

0 comments on commit 17cfccc

Please sign in to comment.