diff --git a/argoproj-crd/Chart.yaml b/argoproj-crd/Chart.yaml index 18114daf..e395f476 100644 --- a/argoproj-crd/Chart.yaml +++ b/argoproj-crd/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: argoproj-crd -version: 0.2.0 -appVersion: 1.7.5 +version: 0.3.0 +appVersion: 2.5.0 description: Manage AppProject and Application that you define for Argo CD. maintainers: - name: cw-ozaki diff --git a/argoproj-crd/README.md b/argoproj-crd/README.md index 24148fce..1f6fba7b 100644 --- a/argoproj-crd/README.md +++ b/argoproj-crd/README.md @@ -29,6 +29,7 @@ The following table lists the configurable parameters of the argoproj-crd chart | `project.roles` | Roles are user defined RBAC roles associated with this project | `""` | | `project.syncWindows` | SyncWindows controls when syncs can be run for apps in this project | `""` | | `applications[].name` | Application name in Argo CD | `nil` | +| `applications[].namespace` | Application resource namespace Argo CD must be 2.5 or higher | `nil` | | `applications[].repoURL` | Repository URL to be the source of the application | `nil` | | `applications[].targetRevision` | HEAD/branch/tag/commit hash | `nil` | | `applications[].path` | Path from the root of the repository that will be the source of the application | `nil` | @@ -36,8 +37,8 @@ The following table lists the configurable parameters of the argoproj-crd chart | `applications[].kustomize` | kustomize specific config | `nil` | | `applications[].directory` | directory | `nil` | | `applications[].plugin` | plugin specific config | `nil` | -| `applications[].server` | Destination cluster to deploy the application | `nil` | -| `applications[].namespace` | Destination namespace to deploy the application | `nil` | +| `applications[].destination.server` | Destination cluster to deploy the application | `nil` | +| `applications[].destination.namespace` | Destination namespace to deploy the application | `nil` | | `applications[].syncPolicy` | Sync policy | `automated: {}` | | `applications[].ignoreDifferences` | Ignore differences at the specified json pointers | `[]` | diff --git a/argoproj-crd/ci.yaml b/argoproj-crd/ci.yaml index 2909db22..6cd77a71 100644 --- a/argoproj-crd/ci.yaml +++ b/argoproj-crd/ci.yaml @@ -5,5 +5,6 @@ applications: repoURL: https://github.com/argoproj/argocd-example-apps.git targetRevision: master path: guestbook/ - server: https://kubernetes.default.svc - namespace: guestbook + destination: + server: https://kubernetes.default.svc + namespace: guestbook diff --git a/argoproj-crd/templates/applications.yaml b/argoproj-crd/templates/applications.yaml index 911e47ed..4a5137b0 100644 --- a/argoproj-crd/templates/applications.yaml +++ b/argoproj-crd/templates/applications.yaml @@ -5,6 +5,9 @@ apiVersion: argoproj.io/v1alpha1 kind: Application metadata: name: {{ $app.name }} + {{- with $app.namespace }} + namespace: {{ $app.namespace }} + {{- end }} labels: {{- include "argoproj-crd.labels" $root | nindent 4 }} {{- with $app.labels }} @@ -21,9 +24,11 @@ metadata: - resources-finalizer.argocd.argoproj.io {{- end }} spec: + {{- with $app.destination }} destination: - server: {{ $app.server }} - namespace: {{ $app.namespace }} + server: {{ .server }} + namespace: {{ .namespace }} + {{- end }} {{- with $app.ignoreDifferences }} ignoreDifferences: diff --git a/argoproj-crd/values.yaml b/argoproj-crd/values.yaml index 90a38258..3e24dff5 100644 --- a/argoproj-crd/values.yaml +++ b/argoproj-crd/values.yaml @@ -128,17 +128,18 @@ applications: [] # plugin: # name: helmfile + # destination: # Destination cluster to deploy the application. - # server: https://kubernetes.default.svc + # server: https://kubernetes.default.svc # Destination namespace to deploy the application. - # namespace: guestbook + # namespace: guestbook # or - # namespace: - # metadata: - # name: guestbook - # annotations: - # iam.amazonaws.com/permitted: ".*" + # namespace: + # metadata: + # name: guestbook + # annotations: + # iam.amazonaws.com/permitted: ".*" # Sync policy. # syncPolicy: