diff --git a/.circleci/chart-testing.yaml b/.circleci/chart-testing.yaml deleted file mode 100644 index 87e07618..00000000 --- a/.circleci/chart-testing.yaml +++ /dev/null @@ -1,4 +0,0 @@ -chart-repos: - - argo=https://argoproj.github.io/argo-helm - - minio=https://helm.min.io/ - - dandydeveloper=https://dandydeveloper.github.io/charts/ diff --git a/.circleci/config.yml b/.circleci/config.yml index 6c3306ec..79e8d1dc 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,32 +5,13 @@ jobs: - image: quay.io/helmpack/chart-testing:v3.3.1 steps: - checkout - - run: helm repo add stable https://charts.helm.sh/stable - - run: ct lint --config .circleci/chart-testing.yaml --lint-conf .circleci/lintconf.yaml - # Technically this only needs to be run on master, but it's good to have it run on every PR - # so that it is regularly tested. + - run: ct lint --config .github/configs/ct-lint.yaml --lint-conf .github/configs/lintconf.yaml publish: docker: - # We just need an image with `helm` on it. Handily we know of one already. - - image: quay.io/helmpack/chart-testing:v3.3.1 + - image: bash steps: - # install the additional keys needed to push to GitHub. Alex Collins owns these keys. - - add_ssh_keys - - run: git config --global user.email "nobody@circleci.com" - - run: git config --global user.name "Circle CI Build" - - checkout - - run: helm repo add stable https://charts.helm.sh/stable - - run: helm repo add minio https://helm.min.io/ - - run: helm repo add dandydeveloper https://dandydeveloper.github.io/charts/ - # Only actually publish charts on master. - - run: | - set -x - if [ "$CIRCLE_BRANCH" = "master" ]; then - export GIT_PUSH=true - else - export GIT_PUSH=false - fi - sh ./scripts/publish.sh + - run: echo "Replaced by Github Workflow - https://github.com/argoproj/argo-helm/actions/workflows/publish.yml" + workflows: version: 2 workflow: @@ -38,4 +19,4 @@ workflows: - lint - publish: requires: - - lint + - lint \ No newline at end of file diff --git a/.github/configs/cr.yaml b/.github/configs/cr.yaml new file mode 100644 index 00000000..01fdbe0c --- /dev/null +++ b/.github/configs/cr.yaml @@ -0,0 +1,2 @@ +## Reference: https://github.com/helm/chart-releaser +index-path: "./index.yaml" \ No newline at end of file diff --git a/.github/configs/ct-install.yaml b/.github/configs/ct-install.yaml new file mode 100644 index 00000000..e991d382 --- /dev/null +++ b/.github/configs/ct-install.yaml @@ -0,0 +1,19 @@ +## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md +# Don't add the 'debug' attribute, otherwise the workflow won't work anymore +# Only Used for the CT Install Stage +remote: origin +chart-dirs: + - charts +chart-repos: + - argo=https://argoproj.github.io/argo-helm + - minio=https://helm.min.io/ + - dandydeveloper=https://dandydeveloper.github.io/charts/ + - stable=https://charts.helm.sh/stable + - incubator=https://charts.helm.sh/incubator +helm-extra-args: "--timeout 600s" +validate-chart-schema: false +validate-maintainers: true +validate-yaml: true +exclude-deprecated: true +excluded-charts: + - "argocd-applicationset" diff --git a/.github/configs/ct-lint.yaml b/.github/configs/ct-lint.yaml new file mode 100644 index 00000000..e7188eb1 --- /dev/null +++ b/.github/configs/ct-lint.yaml @@ -0,0 +1,18 @@ +## Reference: https://github.com/helm/chart-testing/blob/master/doc/ct_lint-and-install.md +# Don't add the 'debug' attribute, otherwise the workflow won't work anymore +# Only Used for the CT Lint Stage +remote: origin +chart-dirs: + - charts +chart-repos: + - argo=https://argoproj.github.io/argo-helm + - minio=https://helm.min.io/ + - dandydeveloper=https://dandydeveloper.github.io/charts/ + - stable=https://charts.helm.sh/stable + - incubator=https://charts.helm.sh/incubator +helm-extra-args: "--timeout 600s" +validate-chart-schema: false +validate-maintainers: true +validate-yaml: true +exclude-deprecated: true +excluded-charts: [] diff --git a/.circleci/lintconf.yaml b/.github/configs/lintconf.yaml similarity index 100% rename from .circleci/lintconf.yaml rename to .github/configs/lintconf.yaml diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index b81bf109..00000000 --- a/.github/stale.yml +++ /dev/null @@ -1 +0,0 @@ -# See https://github.com/probot/stale diff --git a/.github/workflows/lint-and-test.yml b/.github/workflows/lint-and-test.yml new file mode 100644 index 00000000..1056a239 --- /dev/null +++ b/.github/workflows/lint-and-test.yml @@ -0,0 +1,45 @@ +## Reference: https://github.com/helm/chart-testing-action +--- +name: Linting and Testing +on: pull_request +jobs: + chart-test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Helm + uses: azure/setup-helm@v1 + + - name: Set up python + uses: actions/setup-python@v2 + with: + python-version: 3.7 + + - name: Setup Chart Linting + id: lint + uses: helm/chart-testing-action@v2.0.1 + + - name: List changed charts + id: list-changed + run: | + ## If executed with debug this won't work anymore. + changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed) + charts=$(echo "$changed" | tr '\n' ' ' | xargs) + if [[ -n "$changed" ]]; then + echo "::set-output name=changed::true" + echo "::set-output name=changed_charts::$charts" + fi + - name: Run chart-testing (lint) + run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml + + - name: Create kind cluster + uses: helm/kind-action@v1.1.0 + if: steps.list-changed.outputs.changed == 'true' + + - name: Run chart-testing (install) + run: ct install --config ./.github/configs/ct-install.yaml + if: steps.list-changed.outputs.changed == 'true' diff --git a/.github/workflows/pr-sizing.yml b/.github/workflows/pr-sizing.yml new file mode 100644 index 00000000..d1ba98ee --- /dev/null +++ b/.github/workflows/pr-sizing.yml @@ -0,0 +1,14 @@ +## Reference: https://github.com/pascalgn/size-label-action +--- +name: 'PR Size' +on: + pull_request_target: + types: [opened, synchronize, reopened] +jobs: + size-label: + runs-on: ubuntu-latest + steps: + - name: size-label + uses: "pascalgn/size-label-action@v0.4.2" + env: + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" \ No newline at end of file diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 00000000..f01702a6 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,42 @@ +--- +name: Chart Publish +on: + push: + branches: + - master + - rewrite-build +jobs: + publish: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install Helm + uses: azure/setup-helm@v1 + + - name: Add dependency chart repos + run: | + helm repo add argo https://argoproj.github.io/argo-helm + helm repo add minio https://helm.min.io/ + helm repo add dandydeveloper https://dandydeveloper.github.io/charts/ + helm repo add stable https://charts.helm.sh/stable + helm repo add incubator https://charts.helm.sh/incubator + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + ## This is required to consider the old Circle-CI Index and to stay compatible with all the old releases. + - name: Fetch current Chart Index + run: | + git checkout origin/gh-pages index.yaml + + - name: Run chart-releaser + uses: helm/chart-releaser-action@v1.2.0 + with: + config: "./.github/configs/cr.yaml" + env: + CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index b671fc09..8b16dff4 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -1,14 +1,10 @@ name: Mark stale issues and pull requests - on: schedule: - cron: "30 1 * * *" - jobs: stale: - runs-on: ubuntu-latest - steps: - uses: actions/stale@v3 with: diff --git a/CODEOWNERS b/CODEOWNERS index f35c9b71..0cf6f6db 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,16 +1,19 @@ # https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners +# All charts +/charts/ @mkilchhofer + # Argo Workflows /charts/argo @stefansedich @paguos @vladlosev @yann-soubeyrand @oliverbaehler # Argo CD -/charts/argo-cd @seanson @spencergilbert @davidkarlsen @mr-sour @yann-soubeyrand @oliverbaehler +/charts/argo-cd @seanson @davidkarlsen @mr-sour @yann-soubeyrand @oliverbaehler # Argo Events /charts/argo-events @jbehling @VaibhavPage @oliverbaehler # Argo Rollouts -/charts/argo-rollouts @cabrinha @oliverbaehler +/charts/argo-rollouts @oliverbaehler # Argo CD Notifications /charts/argocd-notifications @alexmt @andyfeller @oliverbaehler diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b64861bb..a4ad43dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -22,6 +22,12 @@ helm delete argo-cd --purge kubectl delete crd -l app.kubernetes.io/part-of=argocd ``` +Pre-requisites: +``` +helm repo add redis-ha https://dandydeveloper.github.io/charts/ +helm dependency update +``` + Minimally: ``` @@ -80,7 +86,7 @@ As part of the Continuous Integration system we run Helm's [Chart Testing](https The checks for this tool are stricter than the standard Helm requirements, where fields normally considered optional like `maintainer` are required in the standard spec and must be valid GitHub usernames. -Linting configuration can be found in [lintconf.yaml](.circleci/lintconf.yaml) +Linting configuration can be found in [ct-lint.yaml](./.github/configs/ct-lint.yaml) The linting can be invoked manually with the following command: @@ -90,11 +96,4 @@ The linting can be invoked manually with the following command: ## Publishing Changes -Changes are automatically publish whenever a commit is merged to master. The CI job (see `.circleci/config.yaml`) runs this: - -``` -GIT_PUSH=true ./scripts/publish.sh -``` - -Script generates tar file for each chart in `charts` directory and push changes to `gh-pages` branch. -Write access to https://github.com/argoproj/argo-helm.git is required to publish changes. +Changes are automatically publish whenever a commit is merged to master. The CI job (see `./.github/workflows/publish.yml`). \ No newline at end of file diff --git a/README.md b/README.md index 63c3aa4b..2db0e70a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Argo Helm Charts +[![Chart Publish](https://github.com/argoproj/argo-helm/actions/workflows/publish.yml/badge.svg?branch=master)](https://github.com/argoproj/argo-helm/actions/workflows/publish.yml) + Argo Helm is a collection of **community maintained** charts for http://argoproj.io/ projects. The charts can be added using following command: ``` diff --git a/charts/argo-cd/Chart.lock b/charts/argo-cd/Chart.lock index 646d7e56..52941728 100644 --- a/charts/argo-cd/Chart.lock +++ b/charts/argo-cd/Chart.lock @@ -1,6 +1,6 @@ dependencies: - name: redis-ha repository: https://dandydeveloper.github.io/charts/ - version: 4.10.1 -digest: sha256:e1e0526ad009ecc065df937b48c4e0e5877e5194242c7888b1dc4467775f2663 -generated: "2021-04-01T08:36:01.324672-07:00" + version: 4.12.14 +digest: sha256:34275a4f4df92c570d07b0553da5d1fa200b6f057f7091746c853fd7399ee30a +generated: "2021-05-03T16:02:41.4356045-04:00" diff --git a/charts/argo-cd/Chart.yaml b/charts/argo-cd/Chart.yaml index 2320a609..502cad37 100644 --- a/charts/argo-cd/Chart.yaml +++ b/charts/argo-cd/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v2 -appVersion: 2.0.0 +appVersion: 2.0.1 description: A Helm chart for ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes. name: argo-cd -version: 3.0.0 +version: 3.5.0 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: @@ -16,6 +16,6 @@ maintainers: - name: seanson dependencies: - name: redis-ha - version: 4.10.1 + version: 4.12.14 repository: https://dandydeveloper.github.io/charts/ condition: redis-ha.enabled diff --git a/charts/argo-cd/README.md b/charts/argo-cd/README.md index 22806038..3c7a8be7 100644 --- a/charts/argo-cd/README.md +++ b/charts/argo-cd/README.md @@ -12,6 +12,26 @@ The default installation is intended to be similar to the provided ArgoCD [relea This chart currently installs the non-HA version of ArgoCD. +### Synchronizing Changes from Original Repository + +In the original [ArgoCD repository](https://github.com/argoproj/argo-cd/) an [`manifests/install.yaml`](https://github.com/argoproj/argo-cd/blob/master/manifests/install.yaml) is generated using `kustomize`. It's the basis for the installation as [described in the docs](https://argo-cd.readthedocs.io/en/stable/getting_started/#1-install-argo-cd). + +When installing ArgoCD using this helm chart the user should have a similar experience and configuration rolled out. Hence, it makes sense to try to achieve a similar output of rendered `.yaml` resources when calling `helm template` using the default settings in `values.yaml`. + +To update the templates and default settings in `values.yaml` it may come in handy to look up the diff of the `manifests/install.yaml` between two versions accordingly. This can either be done directly via github and look for `manifests/install.yaml`: + +https://github.com/argoproj/argo-cd/compare/v1.8.7...v2.0.0#files_bucket + +Or you clone the repository and do a local `git-diff`: + +```bash +git clone https://github.com/argoproj/argo-cd.git +cd argo-cd +git diff v1.8.7 v2.0.0 -- manifests/install.yaml +``` + +Changes in the `CustomResourceDefinition` resources shall be fixed easily by copying 1:1 from the [`manifests/crds` folder](https://github.com/argoproj/argo-cd/tree/master/manifests/crds) into this [`charts/argo-cd/crds` folder](https://github.com/argoproj/argo-helm/tree/master/charts/argo-cd/crds). + ## Upgrading ### 3.0.0 and above @@ -20,7 +40,7 @@ Helm apiVersion switched to `v2`. Requires Helm `3.0.0` or above to install. [Re ### 2.14.7 and above -The `matchLabels` key in the ArgoCD Appliaction Controller is no longer hard-coded. Note that labels are immutable so caution should be exercised when making changes to this resource. +The `matchLabels` key in the ArgoCD Application Controller is no longer hard-coded. Note that labels are immutable so caution should be exercised when making changes to this resource. ### 2.10.x to 2.11.0 @@ -80,6 +100,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | global.hostAliases | Mapping between IP and hostnames that will be injected as entries in the pod's hosts files | `[]` | | nameOverride | Provide a name in place of `argocd` | `"argocd"` | | installCRDs | Install CRDs if you are using Helm2. | `true` | +| configs.clusterCredentials | Provide one or multiple [external cluster credentials](https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#clusters) | `[]` (See [values.yaml](values.yaml)) | | configs.knownHostsAnnotations | Known Hosts configmap annotations | `{}` | | configs.knownHosts.data.ssh_known_hosts | Known Hosts | See [values.yaml](values.yaml) | | configs.secret.annotations | Annotations for argocd-secret | `{}` | @@ -92,6 +113,7 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | configs.tlsCertsAnnotations | TLS certificate configmap annotations | `{}` | | configs.tlsCerts.data."argocd.example.com" | TLS certificate | See [values.yaml](values.yaml) | | configs.secret.extra | add additional secrets to be added to argocd-secret | `{}` | +| configs.styles | Define custom CSS styles for your argo instance ([Read More](https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/)). This Settings will automatically mount the provided css and reference it in the argo configuration. | `""` (See [values.yaml](values.yaml)) | | openshift.enabled | enables using arbitrary uid for argo repo server | `false` | ## ArgoCD Controller @@ -226,12 +248,14 @@ Helm v3 has removed the `install-crds` hook so CRDs are now populated by files i | server.ingress.enabled | Enable an ingress resource for the server | `false` | | server.ingress.hosts | List of ingress hosts | `[]` | | server.ingress.labels | Additional ingress labels. | `{}` | +| server.ingress.ingressClassName | Defines which ingress controller will implement the resource | `""` | | server.ingress.tls | Ingress TLS configuration. | `[]` | | server.ingress.https | Uses `server.service.servicePortHttps` instead `server.service.servicePortHttp` | `false` | | server.ingressGrpc.annotations | Additional ingress annotations for dedicated [gRPC-ingress] | `{}` | | server.ingressGrpc.enabled | Enable an ingress resource for the server for dedicated [gRPC-ingress] | `false` | | server.ingressGrpc.hosts | List of ingress hosts for dedicated [gRPC-ingress] | `[]` | | server.ingressGrpc.labels | Additional ingress labels for dedicated [gRPC-ingress] | `{}` | +| server.ingressGrpc.ingressClassName | Defines which ingress controller will implement the resource [gRPC-ingress] | `""` | | server.ingressGrpc.tls | Ingress TLS configuration for dedicated [gRPC-ingress] | `[]` | | server.route.enabled | Enable a OpenShift route for the server | `false` | | server.route.hostname | Hostname of OpenShift route | `""` | @@ -331,7 +355,8 @@ through `xxx.extraArgs` | redis.enabled | Enable redis | `true` | | redis.image.imagePullPolicy | Redis imagePullPolicy | `"IfNotPresent"` | | redis.image.repository | Redis repository | `"redis"` | -| redis.image.tag | Redis tag | `"5.0.8"` | +| redis.image.tag | Redis tag | `"6.2.1-alpine"` | +| redis.extraArgs | Additional arguments for the `redis-server`. A list of flags. | `[]` | | redis.name | Redis name | `"redis"` | | redis.env | Environment variables for the Redis server. | `[]` | | redis.nodeSelector | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | `{}` | @@ -351,6 +376,6 @@ through `xxx.extraArgs` | redis-ha.redis.config.save | Will save the DB if both the given number of seconds and the given number of write operations against the DB occurred. `""` is disabled | `""` | | redis-ha.haproxy.enabled | Enabled HAProxy LoadBalancing/Proxy | `true` | | redis-ha.haproxy.metrics.enabled | HAProxy enable prometheus metric scraping | `true` | -| redis-ha.image.tag | Redis tag | `"5.0.8-alpine"` | +| redis-ha.image.tag | Redis tag | `"6.2.1-alpine"` | [gRPC-ingress]: https://argoproj.github.io/argo-cd/operator-manual/ingress/ diff --git a/charts/argo-cd/crds/crd-application.yaml b/charts/argo-cd/crds/crd-application.yaml index cd4678fa..c62189e8 100644 --- a/charts/argo-cd/crds/crd-application.yaml +++ b/charts/argo-cd/crds/crd-application.yaml @@ -19,10 +19,7 @@ spec: singular: application scope: Namespaced versions: - - name: v1alpha1 - served: true - storage: true - additionalPrinterColumns: + - additionalPrinterColumns: - jsonPath: .status.sync.status name: Sync Status type: string @@ -33,7 +30,7 @@ spec: name: Revision priority: 10 type: string - subresources: {} + name: v1alpha1 schema: openAPIV3Schema: description: Application is a definition of Application resource. @@ -47,9 +44,10 @@ spec: metadata: type: object operation: - description: Operation contains requested operation parameters. + description: Operation contains information about a requested or running operation properties: info: + description: Info is a list of informational items for this operation items: properties: name: @@ -62,20 +60,20 @@ spec: type: object type: array initiatedBy: - description: OperationInitiator holds information about the operation initiator + description: InitiatedBy contains information about who initiated the operations properties: automated: description: Automated is set to true if operation was initiated automatically by the application controller. type: boolean username: - description: Name of a user who started operation. + description: Username contains the name of a user who started operation type: string type: object retry: - description: Retry controls failed sync retry behavior + description: Retry controls the strategy to apply if a sync fails properties: backoff: - description: Backoff is a backoff strategy + description: Backoff controls how to backoff on subsequent retries of failed syncs properties: duration: description: Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") @@ -89,15 +87,15 @@ spec: type: string type: object limit: - description: Limit is the maximum number of attempts when retrying a container + description: Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed. format: int64 type: integer type: object sync: - description: SyncOperation contains sync operation details. + description: Sync contains parameters for the operation properties: dryRun: - description: DryRun will perform a `kubectl apply --dry-run` without actually performing the sync + description: DryRun specifies to perform a `kubectl apply --dry-run` without actually performing the sync type: boolean manifests: description: Manifests is an optional field that overrides sync source with a local directory for development @@ -105,10 +103,10 @@ spec: type: string type: array prune: - description: Prune deletes resources that are no longer tracked in git + description: Prune specifies to delete resources from the cluster that are no longer tracked in git type: boolean resources: - description: Resources describes which resources to sync + description: Resources describes which resources shall be part of the sync items: description: SyncOperationResource contains resources to sync. properties: @@ -126,26 +124,30 @@ spec: type: object type: array revision: - description: Revision is the revision in which to sync the application to. If omitted, will use the revision specified in app spec. + description: Revision is the revision (Git) or chart version (Helm) which to sync the application to If omitted, will use the revision specified in app spec. type: string source: - description: Source overrides the source definition set in the application. This is typically set in a Rollback operation and nil during a Sync operation + description: Source overrides the source definition set in the application. This is typically set in a Rollback operation and is nil during a Sync operation properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -166,7 +168,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -181,6 +183,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -189,34 +192,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -224,10 +227,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -259,42 +262,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -305,10 +311,10 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL @@ -342,20 +348,20 @@ spec: description: ApplicationSpec represents desired application state. Contains link to repository with application definition and additional parameters link definition revision. properties: destination: - description: Destination overrides the kubernetes server and namespace defined in the environment ksonnet app.yaml + description: Destination is a reference to the target Kubernetes server and namespace properties: name: - description: Name of the destination cluster which can be used instead of server (url) field + description: Name is an alternate way of specifying the target cluster by its symbolic name type: string namespace: - description: Namespace overrides the environment namespace value in the ksonnet app.yaml + description: Namespace specifies the target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace type: string server: - description: Server overrides the environment server value in the ksonnet app.yaml + description: Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API type: string type: object ignoreDifferences: - description: IgnoreDifferences controls resources fields which should be ignored during comparison + description: IgnoreDifferences is a list of resources and their fields which should be ignored during comparison items: description: ResourceIgnoreDifferences contains resource filter and list of json paths which should be ignored during comparison with live state. properties: @@ -377,7 +383,7 @@ spec: type: object type: array info: - description: Infos contains a list of useful information (URLs, email addresses, and plain text) that relates to the application + description: Info contains a list of information (URLs, email addresses, and plain text) that relates to the application items: properties: name: @@ -390,30 +396,34 @@ spec: type: object type: array project: - description: Project is a application project name. Empty name means that application belongs to 'default' project. + description: Project is a reference to the project this application belongs to. The empty string means that application belongs to the 'default' project. type: string revisionHistoryLimit: - description: This limits this number of items kept in the apps revision history. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10. + description: RevisionHistoryLimit limits the number of items kept in the application's revision history, which is used for informational purposes as well as for rollbacks to previous versions. This should only be changed in exceptional circumstances. Setting to zero will store no history. This will reduce storage used. Increasing will increase the space used to store the history, so we do not recommend increasing it. Default is 10. format: int64 type: integer source: - description: Source is a reference to the location ksonnet application definition + description: Source is a reference to the location of the application's manifests or chart properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -434,7 +444,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -449,6 +459,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -457,34 +468,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -492,10 +503,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -527,42 +538,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -573,16 +587,16 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL type: object syncPolicy: - description: SyncPolicy controls when a sync will be performed + description: SyncPolicy controls when and how a sync will be performed properties: automated: description: Automated will keep an application synced to the target revision @@ -591,17 +605,17 @@ spec: description: 'AllowEmpty allows apps have zero live resources (default: false)' type: boolean prune: - description: 'Prune will prune resources automatically as part of automated sync (default: false)' + description: 'Prune specifies whether to delete resources from the cluster that are not found in the sources anymore as part of automated sync (default: false)' type: boolean selfHeal: - description: 'SelfHeal enables auto-syncing if (default: false)' + description: 'SelfHeal specifes whether to revert resources back to their desired state upon modification in the cluster (default: false)' type: boolean type: object retry: description: Retry controls failed sync retry behavior properties: backoff: - description: Backoff is a backoff strategy + description: Backoff controls how to backoff on subsequent retries of failed syncs properties: duration: description: Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") @@ -615,7 +629,7 @@ spec: type: string type: object limit: - description: Limit is the maximum number of attempts when retrying a container + description: Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed. format: int64 type: integer type: object @@ -631,14 +645,15 @@ spec: - source type: object status: - description: ApplicationStatus contains information about application sync, health status + description: ApplicationStatus contains status information for the application properties: conditions: + description: Conditions is a list of currently observed application conditions items: - description: ApplicationCondition contains details about current application condition + description: ApplicationCondition contains details about an application condition, which is usally an error or warning properties: lastTransitionTime: - description: LastTransitionTime is the time the condition was first observed. + description: LastTransitionTime is the time the condition was last observed format: date-time type: string message: @@ -653,24 +668,26 @@ spec: type: object type: array health: + description: Health contains information about the application's current health status properties: message: + description: Message is a human-readable informational message describing the health status type: string status: - description: Represents resource health status + description: Status holds the status code of the application or resource type: string type: object history: - description: RevisionHistories is a array of history, oldest first and newest last + description: History contains information about the application's sync history items: - description: RevisionHistory contains information relevant to an application deployment + description: RevisionHistory contains history information about a previous sync properties: deployStartedAt: - description: DeployStartedAt holds the time the deployment started + description: DeployStartedAt holds the time the sync operation started format: date-time type: string deployedAt: - description: DeployedAt holds the time the deployment completed + description: DeployedAt holds the time the sync operation completed format: date-time type: string id: @@ -678,26 +695,30 @@ spec: format: int64 type: integer revision: - description: Revision holds the revision of the sync + description: Revision holds the revision the sync was performed against type: string source: - description: ApplicationSource contains information about github repository, path within repository and target application environment. + description: Source is a reference to the application source used for the sync operation properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -718,7 +739,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -733,6 +754,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -741,34 +763,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -776,10 +798,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -811,42 +833,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -857,10 +882,10 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL @@ -876,19 +901,20 @@ spec: format: date-time type: string operationState: - description: OperationState contains information about state of currently performing operation on application. + description: OperationState contains information about any ongoing operations, such as a sync properties: finishedAt: description: FinishedAt contains time of operation completion format: date-time type: string message: - description: Message hold any pertinent messages when attempting to perform operation (typically errors). + description: Message holds any pertinent messages when attempting to perform operation (typically errors). type: string operation: description: Operation is the original requested operation properties: info: + description: Info is a list of informational items for this operation items: properties: name: @@ -901,20 +927,20 @@ spec: type: object type: array initiatedBy: - description: OperationInitiator holds information about the operation initiator + description: InitiatedBy contains information about who initiated the operations properties: automated: description: Automated is set to true if operation was initiated automatically by the application controller. type: boolean username: - description: Name of a user who started operation. + description: Username contains the name of a user who started operation type: string type: object retry: - description: Retry controls failed sync retry behavior + description: Retry controls the strategy to apply if a sync fails properties: backoff: - description: Backoff is a backoff strategy + description: Backoff controls how to backoff on subsequent retries of failed syncs properties: duration: description: Duration is the amount to back off. Default unit is seconds, but could also be a duration (e.g. "2m", "1h") @@ -928,15 +954,15 @@ spec: type: string type: object limit: - description: Limit is the maximum number of attempts when retrying a container + description: Limit is the maximum number of attempts for retrying a failed sync. If set to 0, no retries will be performed. format: int64 type: integer type: object sync: - description: SyncOperation contains sync operation details. + description: Sync contains parameters for the operation properties: dryRun: - description: DryRun will perform a `kubectl apply --dry-run` without actually performing the sync + description: DryRun specifies to perform a `kubectl apply --dry-run` without actually performing the sync type: boolean manifests: description: Manifests is an optional field that overrides sync source with a local directory for development @@ -944,10 +970,10 @@ spec: type: string type: array prune: - description: Prune deletes resources that are no longer tracked in git + description: Prune specifies to delete resources from the cluster that are no longer tracked in git type: boolean resources: - description: Resources describes which resources to sync + description: Resources describes which resources shall be part of the sync items: description: SyncOperationResource contains resources to sync. properties: @@ -965,26 +991,30 @@ spec: type: object type: array revision: - description: Revision is the revision in which to sync the application to. If omitted, will use the revision specified in app spec. + description: Revision is the revision (Git) or chart version (Helm) which to sync the application to If omitted, will use the revision specified in app spec. type: string source: - description: Source overrides the source definition set in the application. This is typically set in a Rollback operation and nil during a Sync operation + description: Source overrides the source definition set in the application. This is typically set in a Rollback operation and is nil during a Sync operation properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1005,7 +1035,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1020,6 +1050,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -1028,34 +1059,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -1063,10 +1094,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -1098,42 +1129,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -1144,10 +1178,10 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL @@ -1192,34 +1226,39 @@ spec: description: SyncResult is the result of a Sync operation properties: resources: - description: Resources holds the sync result of each individual resource + description: Resources contains a list of sync result items for each individual resource in a sync operation items: description: ResourceResult holds the operation result details of a specific resource properties: group: + description: Group specifies the API group of the resource type: string hookPhase: - description: 'the state of any operation associated with this resource OR hook note: can contain values for non-hook resources' + description: HookPhase contains the state of any operation associated with this resource OR hook This can also contain values for non-hook resources. type: string hookType: - description: the type of the hook, empty for non-hook resources + description: HookType specifies the type of the hook. Empty for non-hook resources type: string kind: + description: Kind specifies the API kind of the resource type: string message: - description: message for the last sync OR operation + description: Message contains an informational or error message for the last sync OR operation type: string name: + description: Name specifies the name of the resource type: string namespace: + description: Namespace specifies the target namespace of the resource type: string status: - description: the final result of the sync, this is be empty if the resources is yet to be applied/pruned and is always zero-value for hooks + description: Status holds the final result of the sync. Will be empty if the resources is yet to be applied/pruned and is always zero-value for hooks type: string syncPhase: - description: indicates the particular phase of the sync that this is for + description: SyncPhase indicates the particular phase of the sync that this result was acquired in type: string version: + description: Version specifies the API version of the resource type: string required: - group @@ -1230,26 +1269,30 @@ spec: type: object type: array revision: - description: Revision holds the revision of the sync + description: Revision holds the revision this sync operation was performed to type: string source: description: Source records the application source information of the sync, used for comparing auto-sync properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1270,7 +1313,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1285,6 +1328,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -1293,34 +1337,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -1328,10 +1372,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -1363,42 +1407,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -1409,10 +1456,10 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL @@ -1430,17 +1477,20 @@ spec: format: date-time type: string resources: + description: Resources is a list of Kubernetes resources managed by this application items: - description: ResourceStatus holds the current sync and health status of a resource + description: 'ResourceStatus holds the current sync and health status of a resource TODO: describe members of this type' properties: group: type: string health: + description: HealthStatus contains information about the currently observed health state of an application or resource properties: message: + description: Message is a human-readable informational message describing the health status type: string status: - description: Represents resource health status + description: Status holds the status code of the application or resource type: string type: object hook: @@ -1461,8 +1511,10 @@ spec: type: object type: array sourceType: + description: SourceType specifies the type of this application type: string summary: + description: Summary contains a list of URLs and container images used by this application properties: externalURLs: description: ExternalURLs holds all external URLs of application child resources. @@ -1476,42 +1528,46 @@ spec: type: array type: object sync: - description: SyncStatus is a comparison result of application spec and deployed application. + description: Sync contains information about the application's current sync status properties: comparedTo: - description: ComparedTo contains application source and target which was used for resources comparison + description: ComparedTo contains information about what has been compared properties: destination: - description: ApplicationDestination contains deployment destination information + description: Destination is a reference to the application's destination used for comparison properties: name: - description: Name of the destination cluster which can be used instead of server (url) field + description: Name is an alternate way of specifying the target cluster by its symbolic name type: string namespace: - description: Namespace overrides the environment namespace value in the ksonnet app.yaml + description: Namespace specifies the target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace type: string server: - description: Server overrides the environment server value in the ksonnet app.yaml + description: Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API type: string type: object source: - description: ApplicationSource contains information about github repository, path within repository and target application environment. + description: Source is a reference to the application's source used for comparison properties: chart: - description: Chart is a Helm chart name + description: Chart is a Helm chart name, and must be specified for applications sourced from a Helm repo. type: string directory: description: Directory holds path/directory specific options properties: exclude: + description: Exclude contains a glob pattern to match paths against that should be explicitly excluded from being used during manifest generation + type: string + include: + description: Include contains a glob pattern to match paths against that should be explicitly included during manifest generation type: string jsonnet: - description: ApplicationSourceJsonnet holds jsonnet specific options + description: Jsonnet holds options specific to Jsonnet properties: extVars: description: ExtVars is a list of Jsonnet External Variables items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1532,7 +1588,7 @@ spec: tlas: description: TLAS is a list of Jsonnet Top-level Arguments items: - description: JsonnetVar is a jsonnet variable + description: JsonnetVar represents a variable to be passed to jsonnet during manifest generation properties: code: type: boolean @@ -1547,6 +1603,7 @@ spec: type: array type: object recurse: + description: Recurse specifies whether to scan a directory recursively for manifests type: boolean type: object helm: @@ -1555,34 +1612,34 @@ spec: fileParameters: description: FileParameters are file parameters to the helm template items: - description: HelmFileParameter is a file parameter to a helm template + description: HelmFileParameter is a file parameter that's passed to helm template during manifest generation properties: name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string path: - description: Path is the path value for the helm parameter + description: Path is the path to the file containing the values for the Helm parameter type: string type: object type: array parameters: - description: Parameters are parameters to the helm template + description: Parameters is a list of Helm parameters which are passed to the helm template command upon manifest generation items: - description: HelmParameter is a parameter to a helm template + description: HelmParameter is a parameter that's passed to helm template during manifest generation properties: forceString: description: ForceString determines whether to tell Helm to interpret booleans and numbers as strings type: boolean name: - description: Name is the name of the helm parameter + description: Name is the name of the Helm parameter type: string value: - description: Value is the value for the helm parameter + description: Value is the value for the Helm parameter type: string type: object type: array releaseName: - description: The Helm release name. If omitted it will use the application name + description: ReleaseName is the Helm release name to use. If omitted it will use the application name type: string valueFiles: description: ValuesFiles is a list of Helm value files to use when generating a template @@ -1590,10 +1647,10 @@ spec: type: string type: array values: - description: Values is Helm values, typically defined as a block + description: Values specifies Helm values to be passed to helm template, typically defined as a block type: string version: - description: Version is the Helm version to use for templating with + description: Version is the Helm version to use for templating (either "2" or "3") type: string type: object ksonnet: @@ -1625,42 +1682,45 @@ spec: commonAnnotations: additionalProperties: type: string - description: CommonAnnotations adds additional kustomize commonAnnotations + description: CommonAnnotations is a list of additional annotations to add to rendered manifests type: object commonLabels: additionalProperties: type: string - description: CommonLabels adds additional kustomize commonLabels + description: CommonLabels is a list of additional labels to add to rendered manifests type: object images: - description: Images are kustomize image overrides + description: Images is a list of Kustomize image override specifications items: + description: KustomizeImage represents a Kustomize image definition in the format [old_image_name=]: type: string type: array namePrefix: - description: NamePrefix is a prefix appended to resources for kustomize apps + description: NamePrefix is a prefix appended to resources for Kustomize apps type: string nameSuffix: - description: NameSuffix is a suffix appended to resources for kustomize apps + description: NameSuffix is a suffix appended to resources for Kustomize apps type: string version: - description: Version contains optional Kustomize version + description: Version controls which version of Kustomize to use for rendering manifests type: string type: object path: - description: Path is a directory path within the Git repository + description: Path is a directory path within the Git repository, and is only valid for applications sourced from Git. type: string plugin: description: ConfigManagementPlugin holds config management plugin specific options properties: env: + description: Env is a list of environment variable entries items: + description: EnvEntry represents an entry in the application's environment properties: name: - description: the name, usually uppercase + description: Name is the name of the variable, usually expressed in uppercase type: string value: - description: the value + description: Value is the value of the variable type: string required: - name @@ -1671,10 +1731,10 @@ spec: type: string type: object repoURL: - description: RepoURL is the repository URL of the application manifests + description: RepoURL is the URL to the repository (Git or Helm) that contains the application manifests type: string targetRevision: - description: TargetRevision defines the commit, tag, or branch in which to sync the application to. If omitted, will sync to HEAD + description: TargetRevision defines the revision of the source to sync the application to. In case of Git, this can be commit, tag, or branch. If omitted, will equal to HEAD. In case of Helm, this is a semver tag for the Chart's version. type: string required: - repoURL @@ -1684,9 +1744,10 @@ spec: - source type: object revision: + description: Revision contains information about the revision the comparison has been performed to type: string status: - description: SyncStatusCode is a type which represents possible comparison results + description: Status is the sync state of the comparison type: string required: - status @@ -1696,3 +1757,6 @@ spec: - metadata - spec type: object + served: true + storage: true + subresources: {} diff --git a/charts/argo-cd/crds/crd-project.yaml b/charts/argo-cd/crds/crd-project.yaml index 2dab45a5..40182848 100644 --- a/charts/argo-cd/crds/crd-project.yaml +++ b/charts/argo-cd/crds/crd-project.yaml @@ -20,8 +20,6 @@ spec: scope: Namespaced versions: - name: v1alpha1 - served: true - storage: true schema: openAPIV3Schema: description: 'AppProject provides a logical grouping of applications, providing controls for: * where the apps may deploy to (cluster whitelist) * what may be deployed (repository whitelist, resource whitelist/blacklist) * who can access these applications (roles, OIDC group claims bindings) * and what they can do (RBAC policies) * automation access to these roles (JWT tokens)' @@ -71,16 +69,16 @@ spec: destinations: description: Destinations contains list of destinations available for deployment items: - description: ApplicationDestination contains deployment destination information + description: ApplicationDestination holds information about the application's destination properties: name: - description: Name of the destination cluster which can be used instead of server (url) field + description: Name is an alternate way of specifying the target cluster by its symbolic name type: string namespace: - description: Namespace overrides the environment namespace value in the ksonnet app.yaml + description: Namespace specifies the target namespace for the application's resources. The namespace will only be set for namespace-scoped resources that have not set a value for .metadata.namespace type: string server: - description: Server overrides the environment server value in the ksonnet app.yaml + description: Server specifies the URL of the target cluster and must be set to the Kubernetes control plane API type: string type: object type: array @@ -116,7 +114,9 @@ spec: description: OrphanedResources specifies if controller should monitor orphaned resources of apps in this project properties: ignore: + description: Ignore contains a list of resources that are to be excluded from orphaned resources monitoring items: + description: OrphanedResourceKey is a reference to a resource to be ignored from properties: group: type: string @@ -173,7 +173,7 @@ spec: type: object type: array signatureKeys: - description: List of PGP key IDs that commits to be synced to must be signed with + description: SignatureKeys contains a list of PGP key IDs that commits in Git must be signed with in order to be allowed for sync items: description: SignatureKey is the specification of a key required to verify commit signatures with properties: @@ -225,34 +225,35 @@ spec: type: array type: object status: - description: Status of the AppProject + description: AppProjectStatus contains status information for AppProject CRs properties: jwtTokensByRole: - description: JWT Tokens issued for each of the roles in the project additionalProperties: + description: JWTTokens represents a list of JWT tokens properties: - items: - description: List of JWT Tokens issued for the role - items: - description: Holds the issuedAt and expiresAt values of the token + items: + items: + description: JWTToken holds the issuedAt and expiresAt values of a token properties: exp: - description: The expiresAt value of a token format: int64 type: integer iat: - description: The issuedAt value of a token format: int64 type: integer id: - description: ID of the token type: string + required: + - iat type: object type: array type: object + description: JWTTokensByRole contains a list of JWT tokens issued for a given role type: object type: object required: - metadata - spec type: object + served: true + storage: true diff --git a/charts/argo-cd/templates/NOTES.txt b/charts/argo-cd/templates/NOTES.txt index 138ba588..a5f59108 100644 --- a/charts/argo-cd/templates/NOTES.txt +++ b/charts/argo-cd/templates/NOTES.txt @@ -9,7 +9,8 @@ In order to access the server UI you have the following options: - Add the `--insecure` flag to `server.extraArgs` in the values file and terminate SSL at your ingress: https://github.com/argoproj/argo-cd/blob/master/docs/operator-manual/ingress.md#option-2-multiple-ingress-objects-and-hosts -After reaching the UI the first time you can login with username: admin and the password will be the -name of the server pod. You can get the pod name by running: +After reaching the UI the first time you can login with username: admin and the random password generated during the installation. You can find the password by running: -kubectl get pods -n {{ .Release.Namespace }} -l app.kubernetes.io/name={{ include "argo-cd.name" . }}-server -o name | cut -d'/' -f 2 +kubectl -n {{ .Release.Namespace }} get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d + +(You should delete the initial secret afterwards as suggested by the Getting Started Guide: https://github.com/argoproj/argo-cd/blob/master/docs/getting_started.md#4-login-using-the-cli) diff --git a/charts/argo-cd/templates/_helpers.tpl b/charts/argo-cd/templates/_helpers.tpl index 431f9069..79723e71 100644 --- a/charts/argo-cd/templates/_helpers.tpl +++ b/charts/argo-cd/templates/_helpers.tpl @@ -138,4 +138,35 @@ app.kubernetes.io/instance: {{ .context.Release.Name }} {{- if .component }} app.kubernetes.io/component: {{ .component }} {{- end }} -{{- end }} \ No newline at end of file +{{- end }} + +{{/* +Return the appropriate apiVersion for ingress +*/}} +{{- define "argo-cd.ingress.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "extensions/v1beta1" -}} +{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.GitVersion -}} +{{- print "networking.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "networking.k8s.io/v1" -}} +{{- end -}} +{{- end -}} + +{{/* +Argo Configuration Preset Values (Incluenced by Values configuration) +*/}} +{{- define "argo-cd.config.presets" -}} + {{- if .Values.configs.styles }} +ui.cssurl: "./custom/custom.styles.css" + {{- end }} +{{- end -}} + +{{/* +Merge Argo Configuration with Preset Configuration +*/}} +{{- define "argo-cd.config" -}} + {{- if .Values.server.configEnabled -}} +{{- toYaml (mergeOverwrite (default dict (fromYaml (include "argo-cd.config.presets" $))) .Values.server.config) }} + {{- end -}} +{{- end -}} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml b/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml index 3426c9c8..bd6ff8aa 100644 --- a/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/clusterrole.yaml @@ -6,6 +6,9 @@ metadata: labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} rules: +{{- if .Values.controller.clusterRoleRules.enabled }} +{{- toYaml .Values.controller.clusterRoleRules.rules | nindent 2 }} +{{ else }} - apiGroups: - '*' resources: @@ -16,4 +19,5 @@ rules: - '*' verbs: - '*' -{{- end }} \ No newline at end of file +{{- end }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml index 6fe98a24..7902be76 100755 --- a/charts/argo-cd/templates/argocd-application-controller/deployment.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/deployment.yaml @@ -70,6 +70,9 @@ spec: {{- if .Values.controller.env }} env: {{- toYaml .Values.controller.env | nindent 8 }} + {{- end }} + {{- with .Values.controller.envFrom }} + envFrom: {{- toYaml . | nindent 8 }} {{- end }} ports: - name: controller @@ -92,10 +95,12 @@ spec: timeoutSeconds: {{ .Values.controller.readinessProbe.timeoutSeconds }} successThreshold: {{ .Values.controller.readinessProbe.successThreshold }} failureThreshold: {{ .Values.controller.readinessProbe.failureThreshold }} -{{- if .Values.controller.volumeMounts }} volumeMounts: -{{- toYaml .Values.controller.volumeMounts | nindent 10}} -{{- end }} + - mountPath: /app/config/controller/tls + name: argocd-repo-server-tls + {{- with .Values.controller.volumeMounts }} + {{- toYaml . | nindent 8 }} + {{- end }} resources: {{- toYaml .Values.controller.resources | nindent 10 }} {{- if .Values.controller.nodeSelector }} @@ -115,10 +120,21 @@ spec: hostAliases: {{ toYaml . | indent 6 }} {{- end }} -{{- if .Values.controller.volumes }} volumes: -{{- toYaml .Values.controller.volumes | nindent 8 }} -{{- end }} + - name: argocd-repo-server-tls + secret: + items: + - key: tls.crt + path: tls.crt + - key: tls.key + path: tls.key + - key: ca.crt + path: ca.crt + optional: true + secretName: argocd-repo-server-tls + {{- with .Values.controller.volumes }} + {{- toYaml . | nindent 6 }} + {{- end }} {{- if .Values.controller.priorityClassName }} priorityClassName: {{ .Values.controller.priorityClassName }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-application-controller/servicemonitor.yaml b/charts/argo-cd/templates/argocd-application-controller/servicemonitor.yaml index 51f81030..0b943982 100644 --- a/charts/argo-cd/templates/argocd-application-controller/servicemonitor.yaml +++ b/charts/argo-cd/templates/argocd-application-controller/servicemonitor.yaml @@ -17,7 +17,9 @@ metadata: spec: endpoints: - port: metrics - interval: 30s + {{- with .Values.controller.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} path: /metrics namespaceSelector: matchNames: diff --git a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml index b17f4f1b..0da0c1ed 100644 --- a/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml +++ b/charts/argo-cd/templates/argocd-configs/argocd-cm.yaml @@ -11,6 +11,5 @@ metadata: {{ $key }}: {{ $value | quote }} {{- end }} {{- end }} -data: -{{- toYaml .Values.server.config | nindent 4 }} +data: {{- include "argo-cd.config" $ | nindent 4 }} {{- end }} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml b/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml new file mode 100644 index 00000000..a8079671 --- /dev/null +++ b/charts/argo-cd/templates/argocd-configs/argocd-styles-cm.yaml @@ -0,0 +1,11 @@ +{{- if .Values.configs.styles }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: argocd-custom-styles + labels: + {{- include "argo-cd.labels" (dict "context" . "component" .Values.repoServer.name "name" .Values.repoServer.name) | nindent 4 }} +data: + custom.styles.css: | + {{- .Values.configs.styles | nindent 4 }} +{{- end }} \ No newline at end of file diff --git a/charts/argo-cd/templates/argocd-configs/cluster-secrets.yaml b/charts/argo-cd/templates/argocd-configs/cluster-secrets.yaml new file mode 100644 index 00000000..4fb7e883 --- /dev/null +++ b/charts/argo-cd/templates/argocd-configs/cluster-secrets.yaml @@ -0,0 +1,26 @@ +{{- range .Values.configs.clusterCredentials }} +--- +apiVersion: v1 +kind: Secret +metadata: + name: {{ include "argo-cd.name" $ }}-cluster-{{ .name }} + labels: + {{- include "argo-cd.labels" (dict "context" $) | nindent 4 }} + {{- with .labels }} + {{- toYaml . | nindent 4 }} + {{- end }} + argocd.argoproj.io/secret-type: cluster + {{- with .annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +type: Opaque +stringData: + name: {{ required "A valid .Values.configs.clusterCredentials[].name entry is required!" .name }} + server: {{ required "A valid .Values.configs.clusterCredentials[].server entry is required!" .server }} + {{- with .namespaces }} + namespaces: {{ . }} + {{- end }} + config: | + {{- required "A valid .Values.configs.clusterCredentials[].config entry is required!" .config | toPrettyJson | nindent 4 }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml index 47f04d9d..b0458fad 100755 --- a/charts/argo-cd/templates/argocd-repo-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/deployment.yaml @@ -67,6 +67,9 @@ spec: value: argocd {{- end }} {{- end }} + {{- with .Values.openshift.envFrom }} + envFrom: {{- toYaml . | nindent 8 }} + {{- end }} volumeMounts: {{- if .Values.repoServer.volumeMounts }} {{- toYaml .Values.repoServer.volumeMounts | nindent 8}} @@ -81,6 +84,8 @@ spec: - mountPath: /app/config/tls name: tls-certs {{- end }} + - mountPath: /app/config/reposerver/tls + name: argocd-repo-server-tls - mountPath: /tmp name: tmp-dir ports: @@ -143,6 +148,17 @@ spec: name: argocd-tls-certs-cm name: tls-certs {{- end }} + - name: argocd-repo-server-tls + secret: + items: + - key: tls.crt + path: tls.crt + - key: tls.key + path: tls.key + - key: ca.crt + path: ca.crt + optional: true + secretName: argocd-repo-server-tls - emptyDir: {} name: tmp-dir {{- if .Values.repoServer.initContainers }} diff --git a/charts/argo-cd/templates/argocd-repo-server/servicemonitor.yaml b/charts/argo-cd/templates/argocd-repo-server/servicemonitor.yaml index 0b343750..05b38acc 100644 --- a/charts/argo-cd/templates/argocd-repo-server/servicemonitor.yaml +++ b/charts/argo-cd/templates/argocd-repo-server/servicemonitor.yaml @@ -17,7 +17,9 @@ metadata: spec: endpoints: - port: metrics - interval: 30s + {{- with .Values.controller.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} path: /metrics namespaceSelector: matchNames: diff --git a/charts/argo-cd/templates/argocd-server/deployment.yaml b/charts/argo-cd/templates/argocd-server/deployment.yaml index 4ae1c4c2..44b89c0e 100755 --- a/charts/argo-cd/templates/argocd-server/deployment.yaml +++ b/charts/argo-cd/templates/argocd-server/deployment.yaml @@ -67,6 +67,9 @@ spec: {{- if .Values.server.env }} env: {{- toYaml .Values.server.env | nindent 8 }} + {{- end }} + {{- with .Values.server.envFrom }} + envFrom: {{- toYaml . | nindent 8 }} {{- end }} volumeMounts: {{- if .Values.server.volumeMounts }} @@ -80,6 +83,13 @@ spec: - mountPath: /app/config/tls name: tls-certs {{- end }} + - mountPath: /app/config/server/tls + name: argocd-repo-server-tls + {{- if .Values.configs.styles }} + - mountPath: "/shared/app/custom/custom.styles.css" + subPath: "custom.styles.css" + name: custom-styles + {{- end }} ports: - name: {{ .Values.server.name }} containerPort: {{ .Values.server.containerPort }} @@ -139,6 +149,11 @@ spec: {{- end }} - emptyDir: {} name: static-files + {{- if .Values.configs.styles }} + - configMap: + name: argocd-custom-styles + name: custom-styles + {{- end }} {{- if .Values.configs.knownHosts }} - configMap: name: argocd-ssh-known-hosts-cm @@ -149,6 +164,17 @@ spec: name: argocd-tls-certs-cm name: tls-certs {{- end }} + - name: argocd-repo-server-tls + secret: + items: + - key: tls.crt + path: tls.crt + - key: tls.key + path: tls.key + - key: ca.crt + path: ca.crt + optional: true + secretName: argocd-repo-server-tls {{- if .Values.server.priorityClassName }} priorityClassName: {{ .Values.server.priorityClassName }} {{- end }} diff --git a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml index 914f1b8a..1f5fc4ea 100644 --- a/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress-grpc.yaml @@ -3,11 +3,7 @@ {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingressGrpc.https -}} {{- $paths := .Values.server.ingressGrpc.paths -}} {{- $extraPaths := .Values.server.ingressGrpc.extraPaths -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} -apiVersion: networking.k8s.io/v1beta1 -{{ else }} -apiVersion: extensions/v1beta1 -{{ end -}} +apiVersion: {{ include "argo-cd.ingress.apiVersion" . }} kind: Ingress metadata: {{- if .Values.server.ingressGrpc.annotations }} @@ -19,41 +15,74 @@ metadata: name: {{ template "argo-cd.server.fullname" . }}-grpc labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} -{{- if .Values.server.ingressGrpc.labels }} -{{- toYaml .Values.server.ingressGrpc.labels | nindent 4 }} -{{- end }} + {{- if .Values.server.ingressGrpc.labels }} + {{- toYaml .Values.server.ingressGrpc.labels | nindent 4 }} + {{- end }} spec: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- with .Values.server.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end }} + {{- end }} rules: {{- if .Values.server.ingressGrpc.hosts }} - {{- range $host := .Values.server.ingressGrpc.hosts }} + {{- range $host := .Values.server.ingressGrpc.hosts }} - host: {{ $host }} http: paths: - {{- if $extraPaths }} - {{- toYaml $extraPaths | nindent 10 }} - {{- end -}} - {{- range $p := $paths }} + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end -}} + {{- range $p := $paths }} - path: {{ $p }} + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} backend: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} - {{- end -}} - {{- end -}} + {{- end }} + {{- end -}} + {{- end -}} {{- else }} - http: paths: - {{- if $extraPaths }} - {{- toYaml $extraPaths | nindent 10 }} - {{- end -}} - {{- range $p := $paths }} + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end -}} + {{- range $p := $paths }} - path: {{ $p }} + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} backend: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} - {{- end -}} + {{- end }} + {{- end -}} {{- end -}} {{- if .Values.server.ingressGrpc.tls }} tls: -{{- toYaml .Values.server.ingressGrpc.tls | nindent 4 }} + {{- toYaml .Values.server.ingressGrpc.tls | nindent 4 }} {{- end -}} {{- end -}} diff --git a/charts/argo-cd/templates/argocd-server/ingress.yaml b/charts/argo-cd/templates/argocd-server/ingress.yaml index d4e5020f..1bd2c53c 100644 --- a/charts/argo-cd/templates/argocd-server/ingress.yaml +++ b/charts/argo-cd/templates/argocd-server/ingress.yaml @@ -3,11 +3,7 @@ {{- $servicePort := ternary .Values.server.service.servicePortHttps .Values.server.service.servicePortHttp .Values.server.ingress.https -}} {{- $paths := .Values.server.ingress.paths -}} {{- $extraPaths := .Values.server.ingress.extraPaths -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} -apiVersion: networking.k8s.io/v1beta1 -{{ else }} -apiVersion: extensions/v1beta1 -{{ end -}} +apiVersion: {{ include "argo-cd.ingress.apiVersion" . }} kind: Ingress metadata: {{- if .Values.server.ingress.annotations }} @@ -19,41 +15,74 @@ metadata: name: {{ template "argo-cd.server.fullname" . }} labels: {{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} -{{- if .Values.server.ingress.labels }} -{{- toYaml .Values.server.ingress.labels | nindent 4 }} -{{- end }} + {{- if .Values.server.ingress.labels }} + {{- toYaml .Values.server.ingress.labels | nindent 4 }} + {{- end }} spec: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + {{- with .Values.server.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end }} + {{- end }} rules: {{- if .Values.server.ingress.hosts }} - {{- range $host := .Values.server.ingress.hosts }} + {{- range $host := .Values.server.ingress.hosts }} - host: {{ $host }} http: paths: - {{- if $extraPaths }} - {{- toYaml $extraPaths | nindent 10 }} - {{- end }} - {{- range $p := $paths }} + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end }} + {{- range $p := $paths }} - path: {{ $p }} + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} backend: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} - {{- end -}} - {{- end -}} + {{- end }} + {{- end -}} + {{- end -}} {{- else }} - http: paths: - {{- if $extraPaths }} - {{- toYaml $extraPaths | nindent 10 }} - {{- end }} - {{- range $p := $paths }} + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end }} + {{- range $p := $paths }} - path: {{ $p }} + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} backend: + {{- if eq (include "argo-cd.ingress.apiVersion" $) "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} serviceName: {{ $serviceName }} servicePort: {{ $servicePort }} - {{- end -}} + {{- end }} + {{- end -}} {{- end -}} {{- if .Values.server.ingress.tls }} tls: -{{- toYaml .Values.server.ingress.tls | nindent 4 }} + {{- toYaml .Values.server.ingress.tls | nindent 4 }} {{- end -}} {{- end -}} diff --git a/charts/argo-cd/templates/argocd-server/service.yaml b/charts/argo-cd/templates/argocd-server/service.yaml index 72a4018c..87877d92 100644 --- a/charts/argo-cd/templates/argocd-server/service.yaml +++ b/charts/argo-cd/templates/argocd-server/service.yaml @@ -44,3 +44,6 @@ spec: {{ toYaml .Values.server.service.loadBalancerSourceRanges | indent 4 }} {{- end }} {{- end -}} +{{- with .Values.server.service.externalTrafficPolicy }} + externalTrafficPolicy: {{ . }} +{{- end }} diff --git a/charts/argo-cd/templates/argocd-server/servicemonitor.yaml b/charts/argo-cd/templates/argocd-server/servicemonitor.yaml index ddf52efa..00002faa 100644 --- a/charts/argo-cd/templates/argocd-server/servicemonitor.yaml +++ b/charts/argo-cd/templates/argocd-server/servicemonitor.yaml @@ -17,7 +17,9 @@ metadata: spec: endpoints: - port: metrics - interval: 30s + {{- with .Values.controller.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} path: /metrics namespaceSelector: matchNames: diff --git a/charts/argo-cd/templates/dex/deployment.yaml b/charts/argo-cd/templates/dex/deployment.yaml index 45a2e09e..557140ce 100755 --- a/charts/argo-cd/templates/dex/deployment.yaml +++ b/charts/argo-cd/templates/dex/deployment.yaml @@ -62,6 +62,9 @@ spec: {{- if .Values.dex.env }} env: {{- toYaml .Values.dex.env | nindent 8 }} + {{- end }} + {{- with .Values.dex.envFrom }} + envFrom: {{- toYaml . | nindent 8 }} {{- end }} ports: - name: http diff --git a/charts/argo-cd/templates/dex/serviceaccount.yaml b/charts/argo-cd/templates/dex/serviceaccount.yaml index bb235eec..71707f09 100644 --- a/charts/argo-cd/templates/dex/serviceaccount.yaml +++ b/charts/argo-cd/templates/dex/serviceaccount.yaml @@ -1,4 +1,4 @@ -{{- if .Values.dex.serviceAccount.create }} +{{- if and .Values.dex.enabled .Values.dex.serviceAccount.create }} apiVersion: v1 kind: ServiceAccount automountServiceAccountToken: {{ .Values.dex.serviceAccount.automountServiceAccountToken }} diff --git a/charts/argo-cd/templates/dex/servicemonitor.yaml b/charts/argo-cd/templates/dex/servicemonitor.yaml index adc3394a..58bae6e2 100644 --- a/charts/argo-cd/templates/dex/servicemonitor.yaml +++ b/charts/argo-cd/templates/dex/servicemonitor.yaml @@ -17,7 +17,9 @@ metadata: spec: endpoints: - port: metrics - interval: 30s + {{- with .Values.controller.metrics.serviceMonitor.interval }} + interval: {{ . }} + {{- end }} path: /metrics namespaceSelector: matchNames: diff --git a/charts/argo-cd/templates/redis/deployment.yaml b/charts/argo-cd/templates/redis/deployment.yaml index de88c0d3..a6f0c46a 100755 --- a/charts/argo-cd/templates/redis/deployment.yaml +++ b/charts/argo-cd/templates/redis/deployment.yaml @@ -41,14 +41,20 @@ spec: - "" - --appendonly - "no" + {{- with .Values.redis.extraArgs }} + {{- . | toYaml | nindent 8 }} + {{- end }} image: {{ .Values.redis.image.repository }}:{{ .Values.redis.image.tag }} imagePullPolicy: {{ .Values.redis.image.imagePullPolicy}} {{- if .Values.redis.containerSecurityContext }} securityContext: {{- toYaml .Values.redis.containerSecurityContext | nindent 10 }} - {{- end }} + {{- end }} {{- if .Values.redis.env }} env: {{- toYaml .Values.redis.env | nindent 8 }} + {{- end }} + {{- with .Values.redis.envFrom }} + envFrom: {{- toYaml . | nindent 8 }} {{- end }} ports: - containerPort: {{ .Values.redis.containerPort }} diff --git a/charts/argo-cd/values.yaml b/charts/argo-cd/values.yaml index a7e84181..d5ca989d 100755 --- a/charts/argo-cd/values.yaml +++ b/charts/argo-cd/values.yaml @@ -9,8 +9,8 @@ installCRDs: true global: image: - repository: argoproj/argocd - tag: v2.0.0 + repository: quay.io/argoproj/argocd + tag: v2.0.1 imagePullPolicy: IfNotPresent securityContext: {} # runAsUser: 999 @@ -27,8 +27,8 @@ controller: name: application-controller image: - repository: # argoproj/argocd - tag: # v1.7.11 + repository: # defaults to global.image.repository + tag: # defaults to global.image.tag imagePullPolicy: # IfNotPresent # If changing the number of replicas you must pass the number as ARGOCD_CONTROLLER_REPLICAS as an environment variable @@ -61,6 +61,14 @@ controller: # - name: "ARGOCD_CONTROLLER_REPLICAS" # value: "" + ## envFrom to pass to argocd-controller + ## + envFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + ## Annotations to be added to controller pods ## podAnnotations: {} @@ -143,6 +151,7 @@ controller: servicePort: 8082 serviceMonitor: enabled: false + interval: 30s # selector: # prometheus: kube-prometheus # namespace: monitoring @@ -183,6 +192,13 @@ controller: ## Enable if you would like to grant rights to ArgoCD to deploy to the local Kubernetes cluster. clusterAdminAccess: enabled: true + ## Enable Custom Rules for the Application Controller's Cluster Role resource + ## Enable this and set the rules: to whatever custom rules you want for the Cluster Role resource. + ## Defaults to off + clusterRoleRules: + enabled: false + rules: [] + ## Dex dex: @@ -196,6 +212,7 @@ dex: labels: {} serviceMonitor: enabled: false + interval: 30s image: repository: quay.io/dexidp/dex @@ -210,6 +227,13 @@ dex: ## env: [] + ## envFrom to pass to the Dex server + envFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + ## Annotations to be added to the Dex server pods ## podAnnotations: {} @@ -276,9 +300,15 @@ redis: image: repository: redis - tag: 5.0.10-alpine + tag: 6.2.2-alpine imagePullPolicy: IfNotPresent + ## Additional command line arguments to pass to redis-server + ## + extraArgs: [] + # - --bind + # - "0.0.0.0" + containerPort: 6379 servicePort: 6379 @@ -286,6 +316,14 @@ redis: ## env: [] + ## envFrom to pass to the Redis server + ## + envFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + ## Annotations to be added to the Redis server pods ## podAnnotations: {} @@ -347,7 +385,7 @@ redis-ha: metrics: enabled: true image: - tag: 5.0.8-alpine + tag: 6.2.2-alpine ## Server server: @@ -363,8 +401,8 @@ server: targetMemoryUtilizationPercentage: 50 image: - repository: # argoproj/argocd - tag: # v1.7.11 + repository: # defaults to global.image.repository + tag: # defaults to global.image.tag imagePullPolicy: # IfNotPresent ## Additional command line arguments to pass to argocd-server @@ -376,6 +414,14 @@ server: ## env: [] + ## envFrom to pass to argocd-server + ## + envFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + ## Specify postStart and preStop lifecycle hooks for your argo-cd-server container ## lifecycle: {} @@ -466,6 +512,7 @@ server: loadBalancerIP: "" loadBalancerSourceRanges: [] externalIPs: [] + externalTrafficPolicy: "" ## Server metrics service configuration metrics: @@ -476,6 +523,7 @@ server: servicePort: 8083 serviceMonitor: enabled: false + interval: 30s # selector: # prometheus: kube-prometheus # namespace: monitoring @@ -493,6 +541,7 @@ server: enabled: false annotations: {} labels: {} + ingressClassName: "" ## Argo Ingress. ## Hostnames must be provided if Ingress is enabled. @@ -521,6 +570,7 @@ server: enabled: false annotations: {} labels: {} + ingressClassName: "" ## Argo Ingress. ## Hostnames must be provided if Ingress is enabled. @@ -731,8 +781,8 @@ repoServer: targetMemoryUtilizationPercentage: 50 image: - repository: # argoproj/argocd - tag: # v1.7.11 + repository: # defaults to global.image.repository + tag: # defaults to global.image.tag imagePullPolicy: # IfNotPresent ## Additional command line arguments to pass to argocd-repo-server @@ -743,6 +793,14 @@ repoServer: ## env: [] + ## envFrom to pass to argocd-repo-server + ## + envFrom: [] + # - configMapRef: + # name: config-map-name + # - secretRef: + # name: secret-name + ## Argo repoServer log format: text|json logFormat: text ## Argo repoServer log level @@ -822,6 +880,7 @@ repoServer: servicePort: 8084 serviceMonitor: enabled: false + interval: 30s # selector: # prometheus: kube-prometheus # namespace: monitoring @@ -872,6 +931,31 @@ repoServer: ## Argo Configs configs: + ## External Cluster Credentials + ## reference: + ## - https://argoproj.github.io/argo-cd/operator-manual/declarative-setup/#clusters + ## - https://argoproj.github.io/argo-cd/operator-manual/security/#external-cluster-credentials + clusterCredentials: [] + # - name: mycluster + # server: https://mycluster.com + # labels: {} + # annotations: {} + # config: + # bearerToken: "" + # tlsClientConfig: + # insecure: false + # caData: "" + # - name: mycluster2 + # server: https://mycluster2.com + # labels: {} + # annotations: {} + # namespaces: namespace1,namespace2 + # config: + # bearerToken: "" + # tlsClientConfig: + # insecure: false + # caData: "" + knownHostsAnnotations: {} knownHosts: data: @@ -975,9 +1059,16 @@ configs: # Argo expects the password in the secret to be bcrypt hashed. You can create this hash with # `htpasswd -nbBC 10 "" $ARGO_PWD | tr -d ':\n' | sed 's/$2y/$2a/'` - # argocdServerAdminPassword: + # argocdServerAdminPassword: "" # Password modification time defaults to current time if not set # argocdServerAdminPasswordMtime: "2006-01-02T15:04:05Z" + ## Custom CSS Styles + ## Reference: https://argo-cd.readthedocs.io/en/stable/operator-manual/custom-styles/ + # styles: | + # .nav-bar { + # background: linear-gradient(to bottom, #999, #777, #333, #222, #111); + # } + openshift: enabled: false diff --git a/charts/argo-ci/Chart.yaml b/charts/argo-ci/Chart.yaml deleted file mode 100644 index b658915d..00000000 --- a/charts/argo-ci/Chart.yaml +++ /dev/null @@ -1,11 +0,0 @@ -apiVersion: v1 -description: A Helm chart for Argo-CI -name: argo-ci -version: 0.1.7 -icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png -appVersion: v1.0.0-alpha2 -home: https://github.com/argoproj/argo-helm -maintainers: - - name: alexec - - name: alexmt - - name: jessesuen diff --git a/charts/argo-ci/README.md b/charts/argo-ci/README.md deleted file mode 100644 index 28231e8c..00000000 --- a/charts/argo-ci/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# Argo CI Chart - -This is a **community maintained** chart. diff --git a/charts/argo-ci/requirements.lock b/charts/argo-ci/requirements.lock deleted file mode 100644 index 14b83c58..00000000 --- a/charts/argo-ci/requirements.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: argo - repository: https://argoproj.github.io/argo-helm - version: 0.2.1 -digest: sha256:af0f837200061b1720c0e05168dfc4a9537582f3004de62eeb5ef01b4c78db64 -generated: 2018-10-23T14:50:47.570677461-07:00 diff --git a/charts/argo-ci/requirements.yaml b/charts/argo-ci/requirements.yaml deleted file mode 100644 index e9370ec3..00000000 --- a/charts/argo-ci/requirements.yaml +++ /dev/null @@ -1,4 +0,0 @@ -dependencies: -- name: argo - version: 0.2.1 - repository: https://argoproj.github.io/argo-helm diff --git a/charts/argo-ci/templates/NOTES.txt b/charts/argo-ci/templates/NOTES.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/charts/argo-ci/templates/_helpers.tpl b/charts/argo-ci/templates/_helpers.tpl deleted file mode 100644 index f0d83d2e..00000000 --- a/charts/argo-ci/templates/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/argo-ci/templates/ci-deployment.yaml b/charts/argo-ci/templates/ci-deployment.yaml deleted file mode 100644 index bf2e4121..00000000 --- a/charts/argo-ci/templates/ci-deployment.yaml +++ /dev/null @@ -1,39 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-ci - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - selector: - matchLabels: - app: {{ .Release.Name }}-ci - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ .Release.Name }}-ci - release: {{ .Release.Name }} - spec: - containers: - - name: ci - image: "{{ .Values.imageNamespace }}/{{ .Values.ciImage }}:{{ .Values.imageTag }}" - imagePullPolicy: {{ .Values.imagePullPolicy }} - env: - - name: IN_CLUSTER - value: "true" - - name: NAMESPACE - value: {{ .Values.workflowNamespace }} - - name: ARGO_CI_IMAGE - value: "{{ .Values.imageNamespace }}/{{ .Values.ciImage }}:{{ .Values.imageTag }}" - - name: CONTROLLER_INSTANCE_ID - value: {{ .Release.Name }} - ports: - - containerPort: 8001 - - containerPort: 8002 - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} diff --git a/charts/argo-ci/templates/ci-service.yaml b/charts/argo-ci/templates/ci-service.yaml deleted file mode 100644 index 3c335c62..00000000 --- a/charts/argo-ci/templates/ci-service.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-ci - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - ports: - - port: 80 - protocol: TCP - targetPort: 8001 - selector: - app: {{ .Release.Name }}-ci - sessionAffinity: None - type: LoadBalancer diff --git a/charts/argo-ci/values.yaml b/charts/argo-ci/values.yaml deleted file mode 100644 index 86dadf98..00000000 --- a/charts/argo-ci/values.yaml +++ /dev/null @@ -1,14 +0,0 @@ -imageNamespace: argoproj -ciImage: argoci -imageTag: v1.0.0-alpha2 -imagePullPolicy: Always -# Secrets with credentials to pull images from a private registry -imagePullSecrets: [] -# - name: argo-pull-secret -workflowNamespace: default - -argo: - imagesNamespace: argoproj - installMinio: true - minioBucketName: argo-artifacts - useReleaseAsInstanceID: true diff --git a/charts/argo-events/Chart.yaml b/charts/argo-events/Chart.yaml index fcea120d..b0770954 100644 --- a/charts/argo-events/Chart.yaml +++ b/charts/argo-events/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 description: A Helm chart to install Argo-Events in k8s Cluster name: argo-events -version: 1.2.4 +version: 1.4.2 keywords: - argo-events - sensor-controller @@ -12,6 +12,6 @@ sources: maintainers: - name: VaibhavPage - name: whynowy -appVersion: 1.2.3 +appVersion: 1.3.1 icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png home: https://github.com/argoproj/argo-helm diff --git a/charts/argo-events/ci/test-values.yaml b/charts/argo-events/ci/test-values.yaml index cd5d3916..3078a2d3 100644 --- a/charts/argo-events/ci/test-values.yaml +++ b/charts/argo-events/ci/test-values.yaml @@ -1,6 +1,3 @@ serviceAccount: argo-events-sa-test -additionalSaNamespaces: - - nsone - - nstwo instanceID: test-argo-events singleNamespace: false diff --git a/charts/argo-events/templates/argo-events-cluster-roles.yaml b/charts/argo-events/templates/argo-events-cluster-roles.yaml index 16f55e46..bfd2d021 100644 --- a/charts/argo-events/templates/argo-events-cluster-roles.yaml +++ b/charts/argo-events/templates/argo-events-cluster-roles.yaml @@ -47,10 +47,13 @@ rules: - workflowtemplates/finalizers - sensors - sensors/finalizers + - sensors/status - eventsources - eventsources/finalizers + - eventsources/status - eventbus - eventbus/finalizers + - eventbus/status - apiGroups: - "" resources: diff --git a/charts/argo-events/templates/argo-events-roles.yaml b/charts/argo-events/templates/argo-events-roles.yaml index d6de39d2..56721159 100644 --- a/charts/argo-events/templates/argo-events-roles.yaml +++ b/charts/argo-events/templates/argo-events-roles.yaml @@ -49,10 +49,13 @@ rules: - workflowtemplates/finalizers - sensors - sensors/finalizers + - sensors/status - eventsources - eventsources/finalizers + - eventsources/status - eventbus - eventbus/finalizers + - eventbus/status - apiGroups: - "" resources: diff --git a/charts/argo-events/templates/eventbus-controller-deployment.yaml b/charts/argo-events/templates/eventbus-controller-deployment.yaml index dd734a88..e3631828 100644 --- a/charts/argo-events/templates/eventbus-controller-deployment.yaml +++ b/charts/argo-events/templates/eventbus-controller-deployment.yaml @@ -18,6 +18,12 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.eventbusController.name }} release: {{ .Release.Name }} + {{- with .Values.eventbusController.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .Values.eventbusController.podAnnotations }} + annotations: {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ .Values.serviceAccount }} containers: @@ -49,6 +55,9 @@ spec: port: 8081 initialDelaySeconds: 3 periodSeconds: 3 + {{- with .Values.eventbusController.priorityClassName }} + priorityClassName: {{ . | quote }} + {{- end }} {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/argo-events/templates/eventsource-controller-deployment.yaml b/charts/argo-events/templates/eventsource-controller-deployment.yaml index 95e7e83a..a6522da6 100644 --- a/charts/argo-events/templates/eventsource-controller-deployment.yaml +++ b/charts/argo-events/templates/eventsource-controller-deployment.yaml @@ -18,6 +18,12 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.eventsourceController.name }} release: {{ .Release.Name }} + {{- with .Values.eventsourceController.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .Values.eventsourceController.podAnnotations }} + annotations: {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ .Values.serviceAccount }} containers: @@ -47,6 +53,9 @@ spec: port: 8081 initialDelaySeconds: 3 periodSeconds: 3 + {{- with .Values.eventsourceController.priorityClassName }} + priorityClassName: {{ . | quote }} + {{- end }} {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/argo-events/templates/sensor-controller-deployment.yaml b/charts/argo-events/templates/sensor-controller-deployment.yaml index 214ee2bb..e6a1c104 100644 --- a/charts/argo-events/templates/sensor-controller-deployment.yaml +++ b/charts/argo-events/templates/sensor-controller-deployment.yaml @@ -18,6 +18,12 @@ spec: labels: app: {{ .Release.Name }}-{{ .Values.sensorController.name }} release: {{ .Release.Name }} + {{- with .Values.sensorController.podLabels }} + {{- tpl (toYaml .) $ | nindent 8 }} + {{- end }} + {{- with .Values.sensorController.podAnnotations }} + annotations: {{- toYaml . | nindent 8 }} + {{- end }} spec: serviceAccountName: {{ .Values.serviceAccount }} containers: @@ -47,6 +53,9 @@ spec: port: 8081 initialDelaySeconds: 3 periodSeconds: 3 + {{- with .Values.sensorController.priorityClassName }} + priorityClassName: {{ . | quote }} + {{- end }} {{- with .Values.securityContext }} securityContext: {{- toYaml . | nindent 8 }} {{- end }} diff --git a/charts/argo-events/values.yaml b/charts/argo-events/values.yaml index 05a8d634..a54ec010 100644 --- a/charts/argo-events/values.yaml +++ b/charts/argo-events/values.yaml @@ -45,30 +45,39 @@ singleNamespace: true sensorController: name: sensor-controller image: sensor-controller - tag: v1.2.3 + tag: v1.3.1 replicaCount: 1 sensorImage: sensor + podAnnotations: {} nodeSelector: {} - tolerations: {} + podLabels: {} + priorityClassName: "" + tolerations: [] affinity: {} eventsourceController: name: eventsource-controller image: eventsource-controller - tag: v1.2.3 + tag: v1.3.1 replicaCount: 1 eventsourceImage: eventsource + podAnnotations: {} nodeSelector: {} - tolerations: {} + podLabels: {} + priorityClassName: "" + tolerations: [] affinity: {} eventbusController: name: eventbus-controller image: eventbus-controller - tag: v1.2.3 + tag: v1.3.1 replicaCount: 1 + podAnnotations: {} nodeSelector: {} - tolerations: {} + podLabels: {} + priorityClassName: "" + tolerations: [] affinity: {} natsStreamingImage: nats-streaming:0.17.0 natsMetricsExporterImage: synadia/prometheus-nats-exporter:0.6.2 diff --git a/charts/argo-rollouts/Chart.yaml b/charts/argo-rollouts/Chart.yaml index bf8cd3b3..63a1fd07 100644 --- a/charts/argo-rollouts/Chart.yaml +++ b/charts/argo-rollouts/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "0.10.2" description: A Helm chart for Argo Rollouts name: argo-rollouts -version: 0.5.0 +version: 0.5.3 icon: https://raw.githubusercontent.com/argoproj/argo/master/argo.png home: https://github.com/argoproj/argo-helm maintainers: diff --git a/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml b/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml index b9595710..c3fb9f0c 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-clusterrole.yaml @@ -130,6 +130,7 @@ rules: - networking.istio.io resources: - virtualservices + - destinationrules verbs: - watch - get diff --git a/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml b/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml index dd04516a..1c4342bf 100644 --- a/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml +++ b/charts/argo-rollouts/templates/argo-rollouts-deployment.yaml @@ -38,6 +38,10 @@ spec: imagePullPolicy: {{ .Values.controller.image.pullPolicy }} name: {{ .Values.controller.name }} resources: +{{- toYaml .Values.controller.resources | nindent 10 }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + resources: {{- toYaml .Values.controller.resources | nindent 10 }} {{- if .Values.controller.nodeSelector }} nodeSelector: diff --git a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml index 0ddf3ca3..b70b6f0b 100644 --- a/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-run-crd.yaml @@ -17,6 +17,7 @@ spec: shortNames: - ar singular: analysisrun + preserveUnknownFields: false scope: Namespaced versions: - additionalPrinterColumns: diff --git a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml index 0854fc4c..4712ae2d 100644 --- a/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/analysis-template-crd.yaml @@ -17,6 +17,7 @@ spec: shortNames: - at singular: analysistemplate + preserveUnknownFields: false scope: Namespaced versions: - name: v1alpha1 diff --git a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml index dd9d89cd..72832f03 100644 --- a/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml +++ b/charts/argo-rollouts/templates/crds/cluster-analysis-template-crd.yaml @@ -17,6 +17,7 @@ spec: shortNames: - cat singular: clusteranalysistemplate + preserveUnknownFields: false scope: Cluster versions: - name: v1alpha1 diff --git a/charts/argo-rollouts/templates/crds/experiment-crd.yaml b/charts/argo-rollouts/templates/crds/experiment-crd.yaml index 6fec00ab..1fa5b261 100644 --- a/charts/argo-rollouts/templates/crds/experiment-crd.yaml +++ b/charts/argo-rollouts/templates/crds/experiment-crd.yaml @@ -17,6 +17,7 @@ spec: shortNames: - exp singular: experiment + preserveUnknownFields: false scope: Namespaced versions: - additionalPrinterColumns: diff --git a/charts/argo-rollouts/templates/crds/rollout-crd.yaml b/charts/argo-rollouts/templates/crds/rollout-crd.yaml index 01eaccac..888ca599 100644 --- a/charts/argo-rollouts/templates/crds/rollout-crd.yaml +++ b/charts/argo-rollouts/templates/crds/rollout-crd.yaml @@ -17,6 +17,7 @@ spec: shortNames: - ro singular: rollout + preserveUnknownFields: false scope: Namespaced versions: - additionalPrinterColumns: diff --git a/charts/argo-ci/.helmignore b/charts/argo-workflows/.helmignore similarity index 100% rename from charts/argo-ci/.helmignore rename to charts/argo-workflows/.helmignore diff --git a/charts/argo-workflows/Chart.yaml b/charts/argo-workflows/Chart.yaml new file mode 100644 index 00000000..13b1ea78 --- /dev/null +++ b/charts/argo-workflows/Chart.yaml @@ -0,0 +1,15 @@ +apiVersion: v2 +name: argo-workflows +description: A Helm chart for Argo Workflows +type: application +version: 0.1.2 +appVersion: "v3.0.2" +icon: https://raw.githubusercontent.com/argoproj/argo-workflows/master/docs/assets/argo.png +home: https://github.com/argoproj/argo-helm +sources: + - https://github.com/argoproj/argo-workflows +maintainers: + - name: alexec + - name: alexmt + - name: jessesuen + - name: benjaminws diff --git a/charts/argo-workflows/README.md b/charts/argo-workflows/README.md new file mode 100644 index 00000000..7e1c9dd7 --- /dev/null +++ b/charts/argo-workflows/README.md @@ -0,0 +1,48 @@ +# Argo Workflows Chart + +This is a **community maintained** chart. It is used to set up argo and it's needed dependencies through one command. This is used in conjunction with [helm](https://github.com/kubernetes/helm). + +If you want your deployment of this helm chart to most closely match the [argo CLI](https://github.com/argoproj/argo-workflows), you should deploy it in the `kube-system` namespace. + +## Pre-Requisites + +This chart uses an install hook to configure the CRD definition. Installation of CRDs is a somewhat privileged process in itself and in RBAC enabled clusters the `default` service account for namespaces does not typically have the ability to do create these. + +A few options are: + +- Manually create a ServiceAccount in the Namespace which your release will be deployed w/ appropriate bindings to perform this action and set the `init.serviceAccount` attribute +- Augment the `default` ServiceAccount permissions in the Namespace in which your Release is deployed to have the appropriate permissions + +## Usage Notes + +This chart defaults to setting the `controller.instanceID.enabled` to `false` now, which means the deployed controller will act upon any workflow deployed to the cluster. If you would like to limit the behavior and deploy multiple workflow controllers, please use the `controller.instanceID.enabled` attribute along with one of it's configuration options to set the `instanceID` of the workflow controller to be properly scoped for your needs. + +## Values + +The `values.yaml` contains items used to tweak a deployment of this chart. +Fields to note: + +- `controller.instanceID.enabled`: If set to true, the Argo Controller will **ONLY** monitor Workflow submissions with a `--instanceid` attribute +- `controller.instanceID.useReleaseName`: If set to true then chart set controller instance id to release name +- `controller.instanceID.explicitID`: Allows customization of an instance id for the workflow controller to monitor +- `controller.workflowNamespaces`: This is a list of namespaces where workflows will be ran + +## Breaking changes from the deprecated `argo` chart + +1. the `installCRD` value has been removed. CRDs are now only installed from the conventional crds/ directory +1. the CRDs were updated to `apiextensions.k8s.io/v1` +1. the container image registry/project/tag format was changed to be more in line with the more common + + ```yaml + image: + registry: quay.io + repository: argoproj/argocli + tag: v3.0.1 + ``` + + this also makes it easier for automatic update tooling (eg. renovate bot) to detect and update images. + +1. switched to quay.io as the default registry for all images +1. removed any included usage of Minio +1. aligned the configuration of serviceAccounts with the argo-cd chart, ie: what used to be `server.createServiceAccount` is now `server.serviceAccount.create` +1. moved the previously known as `telemetryServicePort` inside the `telemetryConfig` as `telemetryConfig.servicePort` - same for `metricsConfig` diff --git a/charts/argo-workflows/ci/enable-ingress-values.yaml b/charts/argo-workflows/ci/enable-ingress-values.yaml new file mode 100644 index 00000000..d3485603 --- /dev/null +++ b/charts/argo-workflows/ci/enable-ingress-values.yaml @@ -0,0 +1,5 @@ +server: + ingress: + enabled: true + hosts: + - argo-workflows.127.0.0.1.xip.io diff --git a/charts/argo-workflows/ci/enable-metrics-values.yaml b/charts/argo-workflows/ci/enable-metrics-values.yaml new file mode 100644 index 00000000..64c56cc1 --- /dev/null +++ b/charts/argo-workflows/ci/enable-metrics-values.yaml @@ -0,0 +1,7 @@ +controller: + serviceMonitor: + enabled: false + metricsConfig: + enabled: true + telemetryConfig: + enabled: true diff --git a/charts/argo-workflows/ci/enable-rbac-values.yaml b/charts/argo-workflows/ci/enable-rbac-values.yaml new file mode 100644 index 00000000..10f717ac --- /dev/null +++ b/charts/argo-workflows/ci/enable-rbac-values.yaml @@ -0,0 +1,5 @@ +workflow: + serviceAccount: + create: true # Specifies whether a service account should be created + rbac: + create: true # adds Role and RoleBinding for the above specified service account to be able to run workflows diff --git a/charts/argo/crds/cluster-workflow-template-crd.yaml b/charts/argo-workflows/crds/argoproj.io_clusterworkflowtemplates.yaml similarity index 50% rename from charts/argo/crds/cluster-workflow-template-crd.yaml rename to charts/argo-workflows/crds/argoproj.io_clusterworkflowtemplates.yaml index a189f17c..fa7da83a 100644 --- a/charts/argo/crds/cluster-workflow-template-crd.yaml +++ b/charts/argo-workflows/crds/argoproj.io_clusterworkflowtemplates.yaml @@ -1,14 +1,9 @@ -apiVersion: apiextensions.k8s.io/v1beta1 +apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: clusterworkflowtemplates.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation spec: group: argoproj.io - version: v1alpha1 - scope: Cluster names: kind: ClusterWorkflowTemplate listKind: ClusterWorkflowTemplateList @@ -17,7 +12,24 @@ spec: - clusterwftmpl - cwft singular: clusterworkflowtemplate + scope: Cluster versions: - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - metadata + - spec + type: object served: true storage: true diff --git a/charts/argo-workflows/crds/argoproj.io_cronworkflows.yaml b/charts/argo-workflows/crds/argoproj.io_cronworkflows.yaml new file mode 100644 index 00000000..2878fe9b --- /dev/null +++ b/charts/argo-workflows/crds/argoproj.io_cronworkflows.yaml @@ -0,0 +1,38 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: cronworkflows.argoproj.io +spec: + group: argoproj.io + names: + kind: CronWorkflow + listKind: CronWorkflowList + plural: cronworkflows + shortNames: + - cwf + - cronwf + singular: cronworkflow + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - metadata + - spec + type: object + served: true + storage: true diff --git a/charts/argo-workflows/crds/argoproj.io_workfloweventbindings.yaml b/charts/argo-workflows/crds/argoproj.io_workfloweventbindings.yaml new file mode 100644 index 00000000..9585686a --- /dev/null +++ b/charts/argo-workflows/crds/argoproj.io_workfloweventbindings.yaml @@ -0,0 +1,34 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: workfloweventbindings.argoproj.io +spec: + group: argoproj.io + names: + kind: WorkflowEventBinding + listKind: WorkflowEventBindingList + plural: workfloweventbindings + shortNames: + - wfeb + singular: workfloweventbinding + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - metadata + - spec + type: object + served: true + storage: true diff --git a/charts/argo-workflows/crds/argoproj.io_workflows.yaml b/charts/argo-workflows/crds/argoproj.io_workflows.yaml new file mode 100644 index 00000000..f3751e18 --- /dev/null +++ b/charts/argo-workflows/crds/argoproj.io_workflows.yaml @@ -0,0 +1,48 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: workflows.argoproj.io +spec: + group: argoproj.io + names: + kind: Workflow + listKind: WorkflowList + plural: workflows + shortNames: + - wf + singular: workflow + scope: Namespaced + versions: + - additionalPrinterColumns: + - description: Status of the workflow + jsonPath: .status.phase + name: Status + type: string + - description: When the workflow was started + format: date-time + jsonPath: .status.startedAt + name: Age + type: date + name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + status: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - metadata + - spec + type: object + served: true + storage: true + subresources: {} diff --git a/charts/argo-workflows/crds/argoproj.io_workflowtemplates.yaml b/charts/argo-workflows/crds/argoproj.io_workflowtemplates.yaml new file mode 100644 index 00000000..f6fa080a --- /dev/null +++ b/charts/argo-workflows/crds/argoproj.io_workflowtemplates.yaml @@ -0,0 +1,34 @@ +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + name: workflowtemplates.argoproj.io +spec: + group: argoproj.io + names: + kind: WorkflowTemplate + listKind: WorkflowTemplateList + plural: workflowtemplates + shortNames: + - wftmpl + singular: workflowtemplate + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + type: string + kind: + type: string + metadata: + type: object + spec: + type: object + x-kubernetes-preserve-unknown-fields: true + required: + - metadata + - spec + type: object + served: true + storage: true diff --git a/charts/argo-workflows/templates/NOTES.txt b/charts/argo-workflows/templates/NOTES.txt new file mode 100644 index 00000000..b6ac65d4 --- /dev/null +++ b/charts/argo-workflows/templates/NOTES.txt @@ -0,0 +1,7 @@ +1. Get Argo Server external IP/domain by running: + +kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.server.name }} + +2. Submit the hello-world workflow by running: + +argo submit https://raw.githubusercontent.com/argoproj/argo-workflows/master/examples/hello-world.yaml --watch diff --git a/charts/argo-workflows/templates/_helpers.tpl b/charts/argo-workflows/templates/_helpers.tpl new file mode 100644 index 00000000..f5c8a4c3 --- /dev/null +++ b/charts/argo-workflows/templates/_helpers.tpl @@ -0,0 +1,96 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* +Create argo workflows server name and version as used by the chart label. +*/}} +{{- define "argo-workflows.server.fullname" -}} +{{- printf "%s-%s" (include "argo-workflows.fullname" .) .Values.server.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create controller name and version as used by the chart label. +*/}} +{{- define "argo-workflows.controller.fullname" -}} +{{- printf "%s-%s" (include "argo-workflows.fullname" .) .Values.controller.name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Expand the name of the chart. +*/}} +{{- define "argo-workflows.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +*/}} +{{- define "argo-workflows.fullname" -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "argo-workflows.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "argo-workflows.labels" -}} +helm.sh/chart: {{ include "argo-workflows.chart" .context }} +{{ include "argo-workflows.selectorLabels" (dict "context" .context "component" .component "name" .name) }} +app.kubernetes.io/managed-by: {{ .context.Release.Service }} +app.kubernetes.io/part-of: argo-workflows +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "argo-workflows.selectorLabels" -}} +{{- if .name -}} +app.kubernetes.io/name: {{ include "argo-workflows.name" .context }}-{{ .name }} +{{ end -}} +app.kubernetes.io/instance: {{ .context.Release.Name }} +{{- if .component }} +app.kubernetes.io/component: {{ .component }} +{{- end }} +{{- end }} + +{{/* +Create the name of the server service account to use +*/}} +{{- define "argo-workflows.serverServiceAccountName" -}} +{{- if .Values.server.serviceAccount.create -}} + {{ default (include "argo-workflows.fullname" .) .Values.server.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.server.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Create the name of the controller service account to use +*/}} +{{- define "argo-workflows.controllerServiceAccountName" -}} +{{- if .Values.controller.serviceAccount.create -}} + {{ default (include "argo-workflows.fullname" .) .Values.controller.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.controller.serviceAccount.name }} +{{- end -}} +{{- end -}} + +{{/* +Return the appropriate apiVersion for ingress +*/}} +{{- define "argo-workflows.ingress.apiVersion" -}} +{{- if semverCompare "<1.14-0" .Capabilities.KubeVersion.Version -}} +{{- print "extensions/v1beta1" -}} +{{- else if semverCompare "<1.19-0" .Capabilities.KubeVersion.Version -}} +{{- print "networking.k8s.io/v1beta1" -}} +{{- else -}} +{{- print "networking.k8s.io/v1" -}} +{{- end -}} +{{- end -}} diff --git a/charts/argo/templates/workflow-aggregate-roles.yaml b/charts/argo-workflows/templates/controller/workflow-aggregate-roles.yaml similarity index 84% rename from charts/argo/templates/workflow-aggregate-roles.yaml rename to charts/argo-workflows/templates/controller/workflow-aggregate-roles.yaml index b89e7b13..2143f208 100644 --- a/charts/argo/templates/workflow-aggregate-roles.yaml +++ b/charts/argo-workflows/templates/controller/workflow-aggregate-roles.yaml @@ -5,7 +5,7 @@ metadata: annotations: helm.sh/hook: pre-install helm.sh/hook-delete-policy: before-hook-creation - name: argo-aggregate-to-view + name: argo-workflows-aggregate-to-view labels: rbac.authorization.k8s.io/aggregate-to-view: "true" rules: @@ -14,6 +14,8 @@ rules: resources: - workflows - workflows/finalizers + - workfloweventbindings + - workfloweventbindings/finalizers - workflowtemplates - workflowtemplates/finalizers - cronworkflows @@ -31,7 +33,7 @@ metadata: annotations: helm.sh/hook: pre-install helm.sh/hook-delete-policy: before-hook-creation - name: argo-aggregate-to-edit + name: argo-workflows-aggregate-to-edit labels: rbac.authorization.k8s.io/aggregate-to-edit: "true" rules: @@ -40,6 +42,8 @@ rules: resources: - workflows - workflows/finalizers + - workfloweventbindings + - workfloweventbindings/finalizers - workflowtemplates - workflowtemplates/finalizers - cronworkflows @@ -62,7 +66,7 @@ metadata: annotations: helm.sh/hook: pre-install helm.sh/hook-delete-policy: before-hook-creation - name: argo-aggregate-to-admin + name: argo-workflows-aggregate-to-admin labels: rbac.authorization.k8s.io/aggregate-to-admin: "true" rules: @@ -71,6 +75,8 @@ rules: resources: - workflows - workflows/finalizers + - workfloweventbindings + - workfloweventbindings/finalizers - workflowtemplates - workflowtemplates/finalizers - cronworkflows diff --git a/charts/argo/templates/workflow-controller-cluster-roles.yaml b/charts/argo-workflows/templates/controller/workflow-controller-cluster-roles.yaml similarity index 91% rename from charts/argo/templates/workflow-controller-cluster-roles.yaml rename to charts/argo-workflows/templates/controller/workflow-controller-cluster-roles.yaml index 7d848cc3..a0bd5daa 100644 --- a/charts/argo/templates/workflow-controller-cluster-roles.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-cluster-roles.yaml @@ -5,7 +5,9 @@ kind: Role kind: ClusterRole {{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }} + name: {{ template "argo-workflows.controller.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} rules: - apiGroups: - "" @@ -128,7 +130,6 @@ rules: - patch - delete -{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole @@ -144,4 +145,3 @@ rules: - get - list - watch -{{- end }} diff --git a/charts/argo/templates/workflow-controller-config-map.yaml b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml similarity index 83% rename from charts/argo/templates/workflow-controller-config-map.yaml rename to charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml index 26fe2cd8..afddb194 100644 --- a/charts/argo/templates/workflow-controller-config-map.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-config-map.yaml @@ -1,11 +1,9 @@ apiVersion: v1 kind: ConfigMap metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }}-configmap + name: {{ template "argo-workflows.controller.fullname" . }}-configmap labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" "cm") | nindent 4 }} data: config: | {{- if .Values.controller.instanceID.enabled }} @@ -31,7 +29,7 @@ data: securityContext: {{- toYaml . | nindent 8 }} {{- end }} {{- end }} - {{- if or .Values.minio.install .Values.useDefaultArtifactRepo }} + {{- if .Values.useDefaultArtifactRepo }} artifactRepository: {{- if .Values.artifactRepository.archiveLogs }} archiveLogs: {{ .Values.artifactRepository.archiveLogs }} @@ -44,13 +42,13 @@ data: {{- if .Values.useStaticCredentials }} accessKeySecret: key: {{ .Values.artifactRepository.s3.accessKeySecret.key }} - name: {{ .Values.artifactRepository.s3.accessKeySecret.name | default (printf "%s-%s" .Release.Name "minio") }} + name: {{ .Values.artifactRepository.s3.accessKeySecret.name }} secretKeySecret: key: {{ .Values.artifactRepository.s3.secretKeySecret.key }} - name: {{ .Values.artifactRepository.s3.secretKeySecret.name | default (printf "%s-%s" .Release.Name "minio") }} + name: {{ .Values.artifactRepository.s3.secretKeySecret.name }} {{- end }} - bucket: {{ .Values.artifactRepository.s3.bucket | default .Values.minio.defaultBucket.name }} - endpoint: {{ .Values.artifactRepository.s3.endpoint | default (printf "%s-%s" .Release.Name "minio:9000") }} + bucket: {{ .Values.artifactRepository.s3.bucket }} + endpoint: {{ .Values.artifactRepository.s3.endpoint }} insecure: {{ .Values.artifactRepository.s3.insecure }} {{- if .Values.artifactRepository.s3.keyFormat }} keyFormat: {{ .Values.artifactRepository.s3.keyFormat | quote }} diff --git a/charts/argo/templates/workflow-controller-crb.yaml b/charts/argo-workflows/templates/controller/workflow-controller-crb.yaml similarity index 52% rename from charts/argo/templates/workflow-controller-crb.yaml rename to charts/argo-workflows/templates/controller/workflow-controller-crb.yaml index b534af48..a198ca11 100644 --- a/charts/argo/templates/workflow-controller-crb.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-crb.yaml @@ -5,7 +5,9 @@ kind: RoleBinding kind: ClusterRoleBinding {{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }} + name: {{ template "argo-workflows.controller.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io {{- if .Values.singleNamespace }} @@ -13,13 +15,13 @@ roleRef: {{ else }} kind: ClusterRole {{- end }} - name: {{ .Release.Name }}-{{ .Values.controller.name }} + name: {{ template "argo-workflows.controller.fullname" . }} subjects: - kind: ServiceAccount - name: {{ .Values.controller.serviceAccount }} + name: {{ template "argo-workflows.controllerServiceAccountName" . }} namespace: {{ .Release.Namespace }} {{- if .Values.controller.workflowNamespaces }} -{{- $uiServiceAccount := .Values.controller.serviceAccount }} +{{- $uiServiceAccount := (include "argo-workflows.controllerServiceAccountName" .) }} {{- $namespace := .Release.Namespace }} {{- range $key := .Values.controller.workflowNamespaces }} {{- if not (eq $key $namespace) }} @@ -30,18 +32,18 @@ subjects: {{- end }} {{- end }} -{{- if not .Values.singleNamespace }} --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-template + name: {{ template "argo-workflows.controller.fullname" . }}-cluster-template + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} roleRef: apiGroup: rbac.authorization.k8s.io kind: ClusterRole - name: {{ .Release.Name }}-{{ .Values.controller.name }}-cluster-template + name: {{ template "argo-workflows.controller.fullname" . }}-cluster-template subjects: - kind: ServiceAccount - name: {{ .Values.controller.serviceAccount }} + name: {{ template "argo-workflows.controllerServiceAccountName" . }} namespace: {{ .Release.Namespace }} -{{- end }} diff --git a/charts/argo/templates/workflow-controller-deployment-pdb.yaml b/charts/argo-workflows/templates/controller/workflow-controller-deployment-pdb.yaml similarity index 55% rename from charts/argo/templates/workflow-controller-deployment-pdb.yaml rename to charts/argo-workflows/templates/controller/workflow-controller-deployment-pdb.yaml index a7352a04..564ba412 100644 --- a/charts/argo/templates/workflow-controller-deployment-pdb.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-deployment-pdb.yaml @@ -2,12 +2,9 @@ apiVersion: policy/v1beta1 kind: PodDisruptionBudget metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}} + name: {{ template "argo-workflows.controller.fullname" . }} labels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} spec: {{- if .Values.controller.pdb.minAvailable }} minAvailable: {{ .Values.controller.pdb.minAvailable }} @@ -18,6 +15,5 @@ spec: {{- end }} selector: matchLabels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - release: {{ .Release.Name }} + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }} {{- end }} diff --git a/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml new file mode 100644 index 00000000..c35894ec --- /dev/null +++ b/charts/argo-workflows/templates/controller/workflow-controller-deployment.yaml @@ -0,0 +1,104 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ template "argo-workflows.controller.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.controller.image.tag | quote }} +spec: + replicas: {{ .Values.controller.replicas }} + selector: + matchLabels: + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }} + template: + metadata: + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 8 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.controller.image.tag | quote }} + {{- with.Values.controller.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + serviceAccountName: {{ template "argo-workflows.controllerServiceAccountName" . }} + {{- with .Values.controller.podSecurityContext }} + securityContext: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: controller + image: "{{ .Values.controller.image.registry }}/{{ .Values.controller.image.repository }}:{{ .Values.controller.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.images.pullPolicy }} + command: [ "workflow-controller" ] + args: + - "--configmap" + - "{{ template "argo-workflows.controller.fullname" . }}-configmap" + - "--executor-image" + - "{{ .Values.executor.image.registry }}/{{ .Values.executor.image.repository }}:{{ .Values.executor.image.tag | default .Chart.AppVersion }}" + - "--loglevel" + - "{{ .Values.controller.logging.level }}" + - "--gloglevel" + - "{{ .Values.controller.logging.globallevel }}" + {{- if .Values.singleNamespace }} + - "--namespaced" + {{- end }} + {{- with .Values.controller.workflowWorkers }} + - "--workflow-workers" + - {{ . | quote }} + {{- end }} + {{- with .Values.controller.podWorkers }} + - "--pod-workers" + - {{ . | quote }} + {{- end }} + {{- with .Values.controller.extraArgs }} + {{- toYaml . | nindent 10 }} + {{- end }} + securityContext: + {{- toYaml .Values.controller.securityContext | nindent 12 }} + env: + - name: ARGO_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: LEADER_ELECTION_IDENTITY + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + {{- with .Values.controller.extraEnv }} + {{ toYaml . | nindent 10 }} + {{- end }} + resources: + {{- toYaml .Values.controller.resources | nindent 12 }} + ports: + - name: metrics + containerPort: {{ .Values.controller.metricsConfig.port }} + livenessProbe: + httpGet: + port: metrics + path: {{ .Values.controller.metricsConfig.path }} + initialDelaySeconds: 30 + periodSeconds: 30 + {{- with .Values.images.pullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.controller.priorityClassName }} + priorityClassName: {{ . }} + {{- end }} diff --git a/charts/argo-workflows/templates/controller/workflow-controller-sa.yaml b/charts/argo-workflows/templates/controller/workflow-controller-sa.yaml new file mode 100644 index 00000000..e917bb41 --- /dev/null +++ b/charts/argo-workflows/templates/controller/workflow-controller-sa.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "argo-workflows.controllerServiceAccountName" . }} + {{ with .Values.controller.serviceAccount.annotations }} + annotations: + {{- toYaml .| nindent 4 }} + {{- end }} diff --git a/charts/argo-workflows/templates/controller/workflow-controller-service.yaml b/charts/argo-workflows/templates/controller/workflow-controller-service.yaml new file mode 100644 index 00000000..5c248f49 --- /dev/null +++ b/charts/argo-workflows/templates/controller/workflow-controller-service.yaml @@ -0,0 +1,38 @@ +{{- if or .Values.controller.metricsConfig.enabled .Values.controller.telemetryConfig.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "argo-workflows.controller.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.controller.image.tag | quote }} + {{- with .Values.controller.serviceLabels }} + {{ toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.controller.serviceAnnotations }} + annotations: + {{- toYaml . | nindent 4}} + {{- end }} +spec: + ports: + {{- if .Values.controller.metricsConfig.enabled }} + - name: {{ .Values.controller.metricsConfig.servicePortName }} + port: {{ .Values.controller.metricsConfig.servicePort }} + protocol: TCP + targetPort: {{ .Values.controller.metricsConfig.port }} + {{- end }} + {{- if .Values.controller.telemetryConfig.enabled }} + - name: {{ .Values.controller.telemetryConfig.servicePortName }} + port: {{ .Values.controller.telemetryConfig.servicePort }} + protocol: TCP + targetPort: {{ .Values.controller.telemetryConfig.port }} + {{- end }} + selector: + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 4 }} + sessionAffinity: None + type: {{ .Values.controller.serviceType }} + {{- if and (eq .Values.controller.serviceType "LoadBalancer") .Values.controller.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- toYaml .Values.controller.loadBalancerSourceRanges | nindent 4 }} + {{- end }} +{{- end -}} diff --git a/charts/argo/templates/workflow-controller-servicemonitor.yaml b/charts/argo-workflows/templates/controller/workflow-controller-servicemonitor.yaml similarity index 58% rename from charts/argo/templates/workflow-controller-servicemonitor.yaml rename to charts/argo-workflows/templates/controller/workflow-controller-servicemonitor.yaml index 425fedac..54cf1b31 100644 --- a/charts/argo/templates/workflow-controller-servicemonitor.yaml +++ b/charts/argo-workflows/templates/controller/workflow-controller-servicemonitor.yaml @@ -2,14 +2,11 @@ apiVersion: monitoring.coreos.com/v1 kind: ServiceMonitor metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }} + name: {{ template "argo-workflows.controller.fullname" . }} labels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.controller.serviceMonitor.additionalLabels }} -{{ toYaml .Values.controller.serviceMonitor.additionalLabels | indent 4 }} + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.controller.name "name" .Values.controller.name) | nindent 4 }} + {{- with .Values.controller.serviceMonitor.additionalLabels }} + {{- toYaml . | nindent 4 }} {{- end }} spec: endpoints: @@ -28,6 +25,5 @@ spec: - {{ .Release.Namespace }} selector: matchLabels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - release: {{ .Release.Name }} + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.controller.name) | nindent 6 }} {{- end }} diff --git a/charts/argo/templates/workflow-rb.yaml b/charts/argo-workflows/templates/controller/workflow-rb.yaml similarity index 51% rename from charts/argo/templates/workflow-rb.yaml rename to charts/argo-workflows/templates/controller/workflow-rb.yaml index 17785257..9b27c045 100644 --- a/charts/argo/templates/workflow-rb.yaml +++ b/charts/argo-workflows/templates/controller/workflow-rb.yaml @@ -2,18 +2,18 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: - name: {{ .Release.Name }}-workflow -{{- if .Values.workflow.namespace }} - namespace: {{ .Values.workflow.namespace }} -{{- end }} + name: {{ template "argo-workflows.fullname" . }}-workflow + {{- with .Values.workflow.namespace }} + namespace: {{ . }} + {{- end }} roleRef: apiGroup: rbac.authorization.k8s.io kind: Role - name: {{ .Release.Name }}-workflow + name: {{ template "argo-workflows.fullname" . }}-workflow subjects: - kind: ServiceAccount name: {{ .Values.workflow.serviceAccount.name }} - {{- if .Values.workflow.namespace }} - namespace: {{ .Values.workflow.namespace }} + {{- with .Values.workflow.namespace }} + namespace: {{ . }} {{- end }} {{- end }} diff --git a/charts/argo/templates/workflow-role.yaml b/charts/argo-workflows/templates/controller/workflow-role.yaml similarity index 70% rename from charts/argo/templates/workflow-role.yaml rename to charts/argo-workflows/templates/controller/workflow-role.yaml index 37365f21..bf8b3cff 100644 --- a/charts/argo/templates/workflow-role.yaml +++ b/charts/argo-workflows/templates/controller/workflow-role.yaml @@ -2,9 +2,9 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: - name: {{ .Release.Name }}-workflow - {{- if .Values.workflow.namespace }} - namespace: {{ .Values.workflow.namespace }} + name: {{ template "argo-workflows.fullname" . }}-workflow + {{- with .Values.workflow.namespace }} + namespace: {{ . }} {{- end }} rules: - apiGroups: diff --git a/charts/argo/templates/workflow-sa.yaml b/charts/argo-workflows/templates/controller/workflow-sa.yaml similarity index 77% rename from charts/argo/templates/workflow-sa.yaml rename to charts/argo-workflows/templates/controller/workflow-sa.yaml index 45d97cf0..dc84f2b1 100644 --- a/charts/argo/templates/workflow-sa.yaml +++ b/charts/argo-workflows/templates/controller/workflow-sa.yaml @@ -3,8 +3,8 @@ apiVersion: v1 kind: ServiceAccount metadata: name: {{ .Values.workflow.serviceAccount.name }} - {{- if .Values.workflow.namespace }} - namespace: {{ .Values.workflow.namespace }} + {{- with .Values.workflow.namespace }} + namespace: {{ . }} {{- end }} {{- with .Values.workflow.serviceAccount.annotations }} annotations: diff --git a/charts/argo/templates/server-cluster-roles.yaml b/charts/argo-workflows/templates/server/server-cluster-roles.yaml similarity index 68% rename from charts/argo/templates/server-cluster-roles.yaml rename to charts/argo-workflows/templates/server/server-cluster-roles.yaml index f08720ba..5901bbd1 100644 --- a/charts/argo/templates/server-cluster-roles.yaml +++ b/charts/argo-workflows/templates/server/server-cluster-roles.yaml @@ -1,12 +1,14 @@ {{- if .Values.server.enabled }} apiVersion: rbac.authorization.k8s.io/v1 -{{- if .Values.singleNamespace }} + {{- if .Values.singleNamespace }} kind: Role -{{- else }} + {{- else }} kind: ClusterRole -{{- end }} + {{- end }} metadata: - name: {{ .Release.Name }}-{{ .Values.server.name }} + name: {{ template "argo-workflows.server.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} rules: - apiGroups: - "" @@ -28,7 +30,7 @@ rules: - list - watch - delete -{{- if .Values.server.sso }} + {{- if .Values.server.sso }} - apiGroups: - "" resources: @@ -44,9 +46,7 @@ rules: - secrets verbs: - create -{{- end}} -{{- if .Values.server.sso }} - {{- if .Values.server.sso.rbac }} + {{- if .Values.server.sso.rbac }} - apiGroups: - "" resources: @@ -54,8 +54,8 @@ rules: verbs: - get - list + {{- end }} {{- end }} -{{- end }} - apiGroups: - "" resources: @@ -95,29 +95,29 @@ rules: - get {{- end}} - apiGroups: - - argoproj.io + - argoproj.io resources: - - workflows - - workfloweventbindings - - workflowtemplates - - cronworkflows - - cronworkflows/finalizers - - clusterworkflowtemplates + - eventsources + - sensors + - workflows + - workfloweventbindings + - workflowtemplates + - cronworkflows verbs: - - create - - get - - list - - watch - - update - - patch - - delete - -{{- if not .Values.singleNamespace }} + - create + - get + - list + - watch + - update + - patch + - delete --- apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: - name: {{ .Release.Name }}-{{ .Values.server.name }}-cluster-template + name: {{ template "argo-workflows.server.fullname" . }}-cluster-template + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} rules: - apiGroups: - argoproj.io @@ -134,4 +134,3 @@ rules: - delete {{- end }} {{- end }} -{{- end }} diff --git a/charts/argo-workflows/templates/server/server-crb.yaml b/charts/argo-workflows/templates/server/server-crb.yaml new file mode 100644 index 00000000..fd9450d5 --- /dev/null +++ b/charts/argo-workflows/templates/server/server-crb.yaml @@ -0,0 +1,39 @@ +{{- if and .Values.server.enabled .Values.server.serviceAccount.create -}} +apiVersion: rbac.authorization.k8s.io/v1 +{{- if .Values.singleNamespace }} +kind: RoleBinding +{{ else }} +kind: ClusterRoleBinding +{{- end }} +metadata: + name: {{ template "argo-workflows.server.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + {{- if .Values.singleNamespace }} + kind: Role + {{ else }} + kind: ClusterRole + {{- end }} + name: {{ template "argo-workflows.server.fullname" . }} +subjects: +- kind: ServiceAccount + name: {{ template "argo-workflows.serverServiceAccountName" . }} + namespace: {{ .Release.Namespace }} +--- +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +metadata: + name: {{ template "argo-workflows.server.fullname" . }}-cluster-template + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: {{ template "argo-workflows.server.fullname" . }}-cluster-template +subjects: +- kind: ServiceAccount + name: {{ template "argo-workflows.serverServiceAccountName" . }} + namespace: {{ .Release.Namespace }} +{{- end -}} diff --git a/charts/argo-workflows/templates/server/server-deployment-pdb.yaml b/charts/argo-workflows/templates/server/server-deployment-pdb.yaml new file mode 100644 index 00000000..aeba6547 --- /dev/null +++ b/charts/argo-workflows/templates/server/server-deployment-pdb.yaml @@ -0,0 +1,19 @@ +{{- if and .Values.server.enabled .Values.server.pdb.enabled -}} +apiVersion: policy/v1beta1 +kind: PodDisruptionBudget +metadata: + name: {{ template "argo-workflows.server.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} +spec: + {{- if .Values.server.pdb.minAvailable }} + minAvailable: {{ .Values.server.pdb.minAvailable }} + {{- else if .Values.server.pdb.maxUnavailable }} + maxUnavailable: {{ .Values.server.pdb.maxUnavailable }} + {{- else }} + minAvailable: 0 + {{- end }} + selector: + matchLabels: + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }} +{{- end -}} diff --git a/charts/argo/templates/server-deployment.yaml b/charts/argo-workflows/templates/server/server-deployment.yaml similarity index 57% rename from charts/argo/templates/server-deployment.yaml rename to charts/argo-workflows/templates/server/server-deployment.yaml index 832fd37d..9d1696dd 100644 --- a/charts/argo/templates/server-deployment.yaml +++ b/charts/argo-workflows/templates/server/server-deployment.yaml @@ -2,55 +2,52 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ .Release.Name }}-{{ .Values.server.name}} + name: {{ template "argo-workflows.server.fullname" . }} labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.server.image.tag | quote }} spec: replicas: {{ .Values.server.replicas }} selector: matchLabels: - app: {{ .Release.Name }}-{{ .Values.server.name}} - release: {{ .Release.Name }} + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 6 }} template: metadata: labels: - app: {{ .Release.Name }}-{{ .Values.server.name}} - release: {{ .Release.Name }} - {{- if .Values.server.podLabels }} - {{- toYaml .Values.server.podLabels | nindent 8 }} + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 8 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.server.image.tag | quote }} + {{- with .Values.server.podLabels }} + {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.server.podAnnotations }} + {{- with .Values.server.podAnnotations }} annotations: -{{ toYaml .Values.server.podAnnotations | indent 8}}{{- end }} + {{- toYaml .Values.server.podAnnotations | nindent 8 }} + {{- end }} spec: - serviceAccountName: {{ .Values.server.serviceAccount | quote }} - {{- if .Values.server.podSecurityContext }} + serviceAccountName: {{ template "argo-workflows.serverServiceAccountName" . }} + {{- with .Values.server.podSecurityContext }} securityContext: - {{- toYaml .Values.server.podSecurityContext | nindent 8 }} + {{- toYaml . | nindent 8 }} {{- end }} containers: - name: argo-server + image: "{{ .Values.server.image.registry }}/{{ .Values.server.image.repository }}:{{ .Values.server.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.images.pullPolicy }} + securityContext: + {{- toYaml .Values.server.securityContext | nindent 12 }} args: - server - - --configmap={{ .Release.Name }}-{{ .Values.controller.name }}-configmap - {{- if .Values.server.extraArgs }} - {{- toYaml .Values.server.extraArgs | nindent 10 }} - {{- end }} - {{- if .Values.server.secure }} - - "--secure" + - --configmap={{ template "argo-workflows.controller.fullname" . }}-configmap + {{- with .Values.server.extraArgs }} + {{- toYaml . | nindent 10 }} {{- end }} + - "--secure={{ .Values.server.secure }}" {{- if .Values.singleNamespace }} - "--namespaced" {{- end }} - image: "{{ .Values.images.namespace }}/{{ .Values.images.server }}:{{ default .Values.images.tag .Values.server.image.tag }}" - imagePullPolicy: {{ .Values.images.pullPolicy }} - {{- if .Values.server.podPortName }} ports: - - name: {{ .Values.server.podPortName }} + - name: web containerPort: 2746 - {{- end }} readinessProbe: httpGet: path: / @@ -102,7 +99,7 @@ spec: affinity: {{- toYaml . | nindent 8 }} {{- end }} - {{- if .Values.server.priorityClassName }} - priorityClassName: {{ .Values.server.priorityClassName }} + {{- with .Values.server.priorityClassName }} + priorityClassName: {{ . }} {{- end }} {{- end -}} diff --git a/charts/argo-workflows/templates/server/server-ingress.yaml b/charts/argo-workflows/templates/server/server-ingress.yaml new file mode 100644 index 00000000..f0488031 --- /dev/null +++ b/charts/argo-workflows/templates/server/server-ingress.yaml @@ -0,0 +1,88 @@ +{{- if .Values.server.ingress.enabled -}} +{{- $serviceName := include "argo-workflows.server.fullname" . -}} +{{- $servicePort := .Values.server.servicePort -}} +{{- $paths := .Values.server.ingress.paths -}} +{{- $extraPaths := .Values.server.ingress.extraPaths -}} +apiVersion: {{ include "argo-workflows.ingress.apiVersion" . }} +kind: Ingress +metadata: +{{- if .Values.server.ingress.annotations }} + annotations: + {{- range $key, $value := .Values.server.ingress.annotations }} + {{ $key }}: {{ $value | quote }} + {{- end }} +{{- end }} + name: {{ template "argo-workflows.server.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} + {{- if .Values.server.ingress.labels }} + {{- toYaml .Values.server.ingress.labels | nindent 4 }} + {{- end }} +spec: + {{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + {{- with .Values.server.ingress.ingressClassName }} + ingressClassName: {{ . }} + {{- end }} + {{- end }} + rules: + {{- if .Values.server.ingress.hosts }} + {{- range $host := .Values.server.ingress.hosts }} + - host: {{ $host }} + http: + paths: + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end }} + {{- range $p := $paths }} + - path: {{ $p }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} + backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- else }} + - http: + paths: + {{- if $extraPaths }} + {{- toYaml $extraPaths | nindent 10 }} + {{- end }} + {{- range $p := $paths }} + - path: {{ $p }} + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + pathType: Prefix + {{- end }} + backend: + {{- if $.Capabilities.APIVersions.Has "networking.k8s.io/v1" }} + service: + name: {{ $serviceName }} + port: + {{- if kindIs "float64" $servicePort }} + number: {{ $servicePort }} + {{- else }} + name: {{ $servicePort }} + {{- end }} + {{- else }} + serviceName: {{ $serviceName }} + servicePort: {{ $servicePort }} + {{- end }} + {{- end -}} + {{- end -}} + {{- if .Values.server.ingress.tls }} + tls: + {{- toYaml .Values.server.ingress.tls | nindent 4 }} + {{- end -}} +{{- end -}} diff --git a/charts/argo-workflows/templates/server/server-sa.yaml b/charts/argo-workflows/templates/server/server-sa.yaml new file mode 100644 index 00000000..adcf7b48 --- /dev/null +++ b/charts/argo-workflows/templates/server/server-sa.yaml @@ -0,0 +1,10 @@ +{{- if and .Values.server.enabled .Values.server.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ template "argo-workflows.serverServiceAccountName" . }} + {{- with .Values.server.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end -}} diff --git a/charts/argo-workflows/templates/server/server-service.yaml b/charts/argo-workflows/templates/server/server-service.yaml new file mode 100644 index 00000000..5d161ee8 --- /dev/null +++ b/charts/argo-workflows/templates/server/server-service.yaml @@ -0,0 +1,31 @@ +{{- if .Values.server.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ template "argo-workflows.server.fullname" . }} + labels: + {{- include "argo-workflows.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }} + app.kubernetes.io/version: {{ default .Chart.AppVersion .Values.server.image.tag | quote }} + {{- with .Values.server.serviceAnnotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + ports: + - port: {{ .Values.server.servicePort }} + {{- with .Values.server.servicePortName }} + name: {{ . }} + {{- end }} + targetPort: 2746 + selector: + {{- include "argo-workflows.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }} + sessionAffinity: None + type: {{ .Values.server.serviceType }} + {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerIP }} + loadBalancerIP: {{ .Values.server.loadBalancerIP | quote }} + {{- end }} + {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- toYaml .Values.server.loadBalancerSourceRanges | nindent 4 }} + {{- end }} +{{- end -}} diff --git a/charts/argo/values.yaml b/charts/argo-workflows/values.yaml similarity index 72% rename from charts/argo/values.yaml rename to charts/argo-workflows/values.yaml index 0a5be36d..375c5eb1 100644 --- a/charts/argo/values.yaml +++ b/charts/argo-workflows/values.yaml @@ -1,16 +1,9 @@ images: - namespace: argoproj - controller: workflow-controller - server: argocli - executor: argoexec + # imagePullPolicy to apply to all containers pullPolicy: Always # Secrets with credentials to pull images from a private registry pullSecrets: [] # - name: argo-pull-secret - tag: v2.12.5 - -crdVersion: v1alpha1 -installCRD: true init: # By default the installation will not set an explicit one, which will mean it uses `default` for the namespace the chart is @@ -24,17 +17,19 @@ createAggregateRoles: true singleNamespace: false workflow: - namespace: "" # Specify namespace if workflows run in another namespace than argo. This controls where the service account and RBAC resources will be created. + namespace: "" # Specify namespace if workflows run in another namespace than argo. This controls where the service account and RBAC resources will be created. serviceAccount: - create: false # Specifies whether a service account should be created + create: false # Specifies whether a service account should be created annotations: {} - name: "argo-workflow" # Service account which is used to run workflows + name: "argo-workflow" # Service account which is used to run workflows rbac: - create: false # adds Role and RoleBinding for the above specified service account to be able to run workflows + create: false # adds Role and RoleBinding for the above specified service account to be able to run workflows controller: image: - # Overrides .images.tag if defined. + registry: quay.io + repository: argoproj/workflow-controller + # Overrides the image tag whose default is the chart appVersion. tag: "" # parallelism dictates how many workflows can be running at the same time parallelism: @@ -48,7 +43,17 @@ controller: metricsConfig: enabled: false path: /metrics - port: 8080 + port: 9090 + servicePort: 8080 + servicePortName: metrics + # the controller container's securityContext + securityContext: + readOnlyRootFilesystem: true + runAsNonRoot: true + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL persistence: {} # connectionPool: # maxIdleConns: 100 @@ -69,24 +74,28 @@ controller: # passwordSecret: # name: argo-postgres-config # key: password - workflowDefaults: {} # Only valid for 2.7+ + workflowDefaults: {} # Only valid for 2.7+ # spec: # ttlStrategy: # secondsAfterCompletion: 84600 # workflowWorkers: 32 # podWorkers: 32 - workflowRestrictions: {} # Only valid for 2.9+ + workflowRestrictions: {} # Only valid for 2.9+ # templateReferencing: Strict|Secure telemetryConfig: enabled: false path: /telemetry port: 8081 + servicePort: 8081 + servicePortName: telemetry serviceMonitor: enabled: false additionalLabels: {} - serviceAccount: argo - # Service account annotations - serviceAccountAnnotations: {} + serviceAccount: + create: true + name: argo + # Annotations applied to created service account + annotations: {} name: workflow-controller workflowNamespaces: - default @@ -103,10 +112,6 @@ controller: level: info globallevel: "0" serviceType: ClusterIP - metricsServicePort: 8080 - metricsServicePortName: metrics - telemetryServicePort: 8081 - telemetryServicePortName: telemetry # Annotations to be applied to the controller Service serviceAnnotations: {} # Optional labels to add to the controller Service @@ -136,13 +141,15 @@ controller: # ref: https://kubernetes.io/docs/concepts/configuration/pod-priority-preemption/ # PriorityClass: system-cluster-critical priorityClassName: "" - # https://argoproj.github.io/argo/links/ + # https://argoproj.github.io/argo-workflows/links/ links: [] # executor controls how the init and wait container should be customized executor: image: - # Overrides .images.tag if defined. + registry: quay.io + repository: argoproj/argoexec + # Overrides the image tag whose default is the chart appVersion. tag: "" resources: {} # Adds environment variables for the executor. @@ -154,10 +161,12 @@ server: enabled: true # only updates base url of resources on client side, # it's expected that a proxy server rewrites the request URL and gets rid of this prefix - # https://github.com/argoproj/argo/issues/716#issuecomment-433213190 + # https://github.com/argoproj/argo-workflows/issues/716#issuecomment-433213190 baseHref: / image: - # Overrides .images.tag if defined. + registry: quay.io + repository: argoproj/argocli + # Overrides the image tag whose default is the chart appVersion. tag: "" # optional map of annotations to be applied to the ui Pods podAnnotations: {} @@ -165,16 +174,21 @@ server: podLabels: {} # SecurityContext to set on the server pods podSecurityContext: {} + securityContext: + readOnlyRootFilesystem: false + runAsNonRoot: true + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL name: server serviceType: ClusterIP servicePort: 2746 # servicePortName: http - serviceAccount: argo-server - # Whether to create the service account with the name specified in - # server.serviceAccount and bind it to the server role. - createServiceAccount: true - # Service account annotations - serviceAccountAnnotations: {} + serviceAccount: + create: true + name: argo-server + annotations: {} # Annotations to be applied to the UI Service serviceAnnotations: {} # Optional labels to add to the UI Service @@ -206,7 +220,7 @@ server: # Run the argo server in "secure" mode. Configure this value instead of # "--secure" in extraArgs. See the following documentation for more details # on secure mode: - # https://argoproj.github.io/argo/tls/#encrypted + # https://argoproj.github.io/argo-workflows/tls/ secure: false # Extra arguments to provide to the Argo server binary. @@ -221,36 +235,32 @@ server: ## ingress: enabled: false + annotations: {} + labels: {} + ingressClassName: "" - ## Annotations to be added to the web ingress. + ## Argo Workflows Server Ingress. + ## Hostnames must be provided if Ingress is enabled. + ## Secrets must be manually created in the namespace ## - # annotations: - # kubernetes.io/ingress.class: nginx - # kubernetes.io/tls-acme: "true" + hosts: + [] + # - argocd.example.com + paths: + - / + extraPaths: + [] + # - path: /* + # backend: + # serviceName: ssl-redirect + # servicePort: use-annotation + tls: + [] + # - secretName: argocd-example-tls + # hosts: + # - argocd.example.com + https: false - ## Labels to be added to the web ingress. - ## - # labels: - # use-cloudflare-solver: "true" - - ## Hostnames. - ## Must be provided if Ingress is enabled. - ## - # hosts: - # - argo.domain.com - - ## Additional Paths for each host - # paths: - # - serviceName: "ssl-redirect" - # servicePort: "use-annotation" - - ## TLS configuration. - ## Secrets must be manually created in the namespace. - ## - # tls: - # - secretName: argo-ui-tls - # hosts: - # - argo.domain.com clusterWorkflowTemplates: # Give the server permissions to edit ClusterWorkflowTemplates. enableEditing: true @@ -294,7 +304,7 @@ artifactRepository: # Note the `key` attribute is not the actual secret, it's the PATH to # the contents in the associated secret, as defined by the `name` attribute. accessKeySecret: - # name: -minio (default) + # name: -minio key: accesskey secretKeySecret: # name: -minio @@ -306,25 +316,16 @@ artifactRepository: # roleARN: # useSDKCreds: true # gcs: - # bucket: -argo - # keyFormat: "{{workflow.namespace}}/{{workflow.name}}/" - # serviceAccountKeySecret is a secret selector. - # It references the k8s secret named 'my-gcs-credentials'. - # This secret is expected to have have the key 'serviceAccountKey', - # containing the base64 encoded credentials - # to the bucket. - # - # If it's running on GKE and Workload Identity is used, - # serviceAccountKeySecret is not needed. - # serviceAccountKeySecret: - # name: my-gcs-credentials - # key: serviceAccountKey - - -# NOTE: These are setting attributes for the `minio` optional dependency -minio: - # If set to true then chart installs minio and generate according artifactRepository section in workflow controller config map - install: false - defaultBucket: - enabled: true - name: argo-artifacts + # bucket: -argo + # keyFormat: "{{workflow.namespace}}/{{workflow.name}}/" + # serviceAccountKeySecret is a secret selector. + # It references the k8s secret named 'my-gcs-credentials'. + # This secret is expected to have have the key 'serviceAccountKey', + # containing the base64 encoded credentials + # to the bucket. + # + # If it's running on GKE and Workload Identity is used, + # serviceAccountKeySecret is not needed. + # serviceAccountKeySecret: + # name: my-gcs-credentials + # key: serviceAccountKey diff --git a/charts/argo/.helmignore b/charts/argo/.helmignore deleted file mode 100644 index f0c13194..00000000 --- a/charts/argo/.helmignore +++ /dev/null @@ -1,21 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*~ -# Various IDEs -.project -.idea/ -*.tmproj diff --git a/charts/argo/Chart.lock b/charts/argo/Chart.lock deleted file mode 100644 index 4b57ae05..00000000 --- a/charts/argo/Chart.lock +++ /dev/null @@ -1,6 +0,0 @@ -dependencies: -- name: minio - repository: https://helm.min.io/ - version: 8.0.9 -digest: sha256:0f43ad0a4b4e9af47615ef3da85054712eb28f154418d96b7b974a095cc19260 -generated: "2021-01-13T15:31:40.823086-08:00" diff --git a/charts/argo/Chart.yaml b/charts/argo/Chart.yaml deleted file mode 100644 index 741fa2e6..00000000 --- a/charts/argo/Chart.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v2 -appVersion: v2.12.5 -description: A Helm chart for Argo Workflows -name: argo -version: 0.16.9 -icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png -home: https://github.com/argoproj/argo-helm -maintainers: - - name: alexec - - name: alexmt - - name: jessesuen - - name: benjaminws -dependencies: -- name: minio - version: 8.0.9 - repository: https://helm.min.io/ - condition: minio.install diff --git a/charts/argo/README.md b/charts/argo/README.md deleted file mode 100644 index b0b5613a..00000000 --- a/charts/argo/README.md +++ /dev/null @@ -1,27 +0,0 @@ -## Argo Workflows Chart - -This is a **community maintained** chart. It is used to set up argo and it's needed dependencies through one command. This is used in conjunction with [helm](https://github.com/kubernetes/helm). - -If you want your deployment of this helm chart to most closely match the [argo CLI](https://github.com/argoproj/argo-workflows), you should deploy it in the `kube-system` namespace. - -## Pre-Requisites -This chart uses an install hook to configure the CRD definition. Installation of CRDs is a somewhat privileged process in itself and in RBAC enabled clusters the `default` service account for namespaces does not typically have the ability to do create these. - -A few options are: -- Setup the CRD yourself manually and use `--set installCRD=false` when installing the helm chart. Find the CRDs in the [argo codebase](https://github.com/argoproj/argo-workflows/tree/master/manifests/base/crds/full) -- Manually create a ServiceAccount in the Namespace which your release will be deployed w/ appropriate bindings to perform this action and set the `init.serviceAccount` attribute -- Augment the `default` ServiceAccount permissions in the Namespace in which your Release is deployed to have the appropriate permissions - -## Usage Notes: -This chart defaults to setting the `controller.instanceID.enabled` to `false` now, which means the deployed controller will act upon any workflow deployed to the cluster. If you would like to limit the behavior and deploy multiple workflow controllers, please use the `controller.instanceID.enabled` attribute along with one of it's configuration options to set the `instanceID` of the workflow controller to be properly scoped for your needs. - -## Values - -The `values.yaml` contains items used to tweak a deployment of this chart. -Fields to note: -* `controller.instanceID.enabled`: If set to true, the Argo Controller will **ONLY** monitor Workflow submissions with a `--instanceid` attribute -* `controller.instanceID.useReleaseName`: If set to true then chart set controller instance id to release name -* `controller.instanceID.explicitID`: Allows customization of an instance id for the workflow controller to monitor -* `controller.workflowNamespaces`: This is a list of namespaces where workflows will be ran -* `minio.install`: If this is true, we'll install [minio](https://github.com/kubernetes/charts/tree/master/stable/minio) and build out the artifactRepository section in workflow controller config map. -* `artifactRepository.s3.accessKeySecret` and `artifactRepository.s3.secretKeySecret` These by default link to minio default credentials stored in the secret deployed by the minio chart. diff --git a/charts/argo/crds/cron-workflow-crd.yaml b/charts/argo/crds/cron-workflow-crd.yaml deleted file mode 100644 index abd50b30..00000000 --- a/charts/argo/crds/cron-workflow-crd.yaml +++ /dev/null @@ -1,23 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: cronworkflows.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - group: argoproj.io - names: - kind: CronWorkflow - listKind: CronWorkflowList - plural: cronworkflows - shortNames: - - cwf - - cronwf - singular: cronworkflow - scope: Namespaced - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/charts/argo/crds/workflow-crd.yaml b/charts/argo/crds/workflow-crd.yaml deleted file mode 100644 index 24f6abc2..00000000 --- a/charts/argo/crds/workflow-crd.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: workflows.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: Status of the workflow - name: Status - type: string - - JSONPath: .status.startedAt - description: When the workflow was started - format: date-time - name: Age - type: date - group: argoproj.io - names: - kind: Workflow - listKind: WorkflowList - plural: workflows - shortNames: - - wf - singular: workflow - scope: Namespaced - subresources: {} - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/charts/argo/crds/workflow-eventbinding-crd.yaml b/charts/argo/crds/workflow-eventbinding-crd.yaml deleted file mode 100644 index a58de8e7..00000000 --- a/charts/argo/crds/workflow-eventbinding-crd.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: workfloweventbindings.argoproj.io -spec: - group: argoproj.io - names: - kind: WorkflowEventBinding - listKind: WorkflowEventBindingList - plural: workfloweventbindings - shortNames: - - wfeb - singular: workfloweventbinding - scope: Namespaced - version: v1alpha1 - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/charts/argo/crds/workflow-template-crd.yaml b/charts/argo/crds/workflow-template-crd.yaml deleted file mode 100644 index 0be13451..00000000 --- a/charts/argo/crds/workflow-template-crd.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: apiextensions.k8s.io/v1beta1 -kind: CustomResourceDefinition -metadata: - name: workflowtemplates.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - group: argoproj.io - version: v1alpha1 - scope: Namespaced - names: - kind: WorkflowTemplate - listKind: WorkflowTemplateList - plural: workflowtemplates - shortNames: - - wftmpl - singular: workflowtemplate - versions: - - name: v1alpha1 - served: true - storage: true diff --git a/charts/argo/templates/NOTES.txt b/charts/argo/templates/NOTES.txt deleted file mode 100644 index 327b262d..00000000 --- a/charts/argo/templates/NOTES.txt +++ /dev/null @@ -1,16 +0,0 @@ -1. Get Argo Server external IP/domain by running: - -kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-{{ .Values.server.name }} - -2. Submit the hello-world workflow by running: - -argo submit https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml --watch - -{{ if .Values.minio.install }} - -3. Access Minio UI and create bucket '{{ .Values.minio.defaultBucket.name }}'. Minio UI is available on port 9000 and available via external URL. URL might be retrieved using following -command: - -kubectl --namespace {{ .Release.Namespace }} get services -o wide | grep {{ .Release.Name }}-minio-svc - -{{ end }} diff --git a/charts/argo/templates/_helpers.tpl b/charts/argo/templates/_helpers.tpl deleted file mode 100644 index f0d83d2e..00000000 --- a/charts/argo/templates/_helpers.tpl +++ /dev/null @@ -1,16 +0,0 @@ -{{/* vim: set filetype=mustache: */}} -{{/* -Expand the name of the chart. -*/}} -{{- define "name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -*/}} -{{- define "fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride -}} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} diff --git a/charts/argo/templates/cluster-workflow-template-crd.yaml b/charts/argo/templates/cluster-workflow-template-crd.yaml deleted file mode 100644 index be688da3..00000000 --- a/charts/argo/templates/cluster-workflow-template-crd.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.installCRD }} -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: clusterworkflowtemplates.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - group: argoproj.io - version: v1alpha1 - scope: Cluster - names: - kind: ClusterWorkflowTemplate - plural: clusterworkflowtemplates - shortNames: - - clusterwftmpl - - cwft -{{- end }} diff --git a/charts/argo/templates/cron-workflow-crd.yaml b/charts/argo/templates/cron-workflow-crd.yaml deleted file mode 100644 index 923abdf2..00000000 --- a/charts/argo/templates/cron-workflow-crd.yaml +++ /dev/null @@ -1,19 +0,0 @@ -{{- if .Values.installCRD }} -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: cronworkflows.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - group: argoproj.io - names: - kind: CronWorkflow - plural: cronworkflows - shortNames: - - cronwf - - cwf - scope: Namespaced - version: v1alpha1 -{{- end }} diff --git a/charts/argo/templates/server-crb.yaml b/charts/argo/templates/server-crb.yaml deleted file mode 100644 index bc4886d9..00000000 --- a/charts/argo/templates/server-crb.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- if and .Values.server.enabled .Values.server.createServiceAccount -}} -apiVersion: rbac.authorization.k8s.io/v1 -{{- if .Values.singleNamespace }} -kind: RoleBinding -{{ else }} -kind: ClusterRoleBinding -{{- end }} -metadata: - name: {{ .Release.Name }}-{{ .Values.server.name}} -roleRef: - apiGroup: rbac.authorization.k8s.io - {{- if .Values.singleNamespace }} - kind: Role - {{ else }} - kind: ClusterRole - {{- end }} - name: {{ .Release.Name }}-{{ .Values.server.name}} -subjects: -- kind: ServiceAccount - name: {{ .Values.server.serviceAccount }} - namespace: {{ .Release.Namespace }} - -{{- if not .Values.singleNamespace }} ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: ClusterRoleBinding -metadata: - name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-template -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ .Release.Name }}-{{ .Values.server.name}}-cluster-template -subjects: -- kind: ServiceAccount - name: {{ .Values.server.serviceAccount }} - namespace: {{ .Release.Namespace }} -{{- end }} -{{- end -}} diff --git a/charts/argo/templates/server-deployment-pdb.yaml b/charts/argo/templates/server-deployment-pdb.yaml deleted file mode 100644 index 31f1d4f8..00000000 --- a/charts/argo/templates/server-deployment-pdb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.pdb.enabled -}} -apiVersion: policy/v1beta1 -kind: PodDisruptionBudget -metadata: - name: {{ .Release.Name }}-{{ .Values.server.name}} - labels: - app: {{ .Release.Name }}-{{ .Values.server.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - {{- if .Values.server.pdb.minAvailable }} - minAvailable: {{ .Values.server.pdb.minAvailable }} - {{- else if .Values.server.pdb.maxUnavailable }} - maxUnavailable: {{ .Values.server.pdb.maxUnavailable }} - {{- else }} - minAvailable: 0 - {{- end }} - selector: - matchLabels: - app: {{ .Release.Name }}-{{ .Values.server.name}} - release: {{ .Release.Name }} -{{- end -}} -{{- end -}} diff --git a/charts/argo/templates/server-ingress.yaml b/charts/argo/templates/server-ingress.yaml deleted file mode 100644 index 6eab3f50..00000000 --- a/charts/argo/templates/server-ingress.yaml +++ /dev/null @@ -1,46 +0,0 @@ -{{- if .Values.server.enabled -}} -{{- if .Values.server.ingress.enabled -}} -{{- $serviceName := printf "%s-%s" .Release.Name .Values.server.name -}} -{{- $servicePort := .Values.server.servicePort -}} -{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" }} -apiVersion: networking.k8s.io/v1beta1 -{{ else }} -apiVersion: extensions/v1beta1 -{{ end -}} -kind: Ingress -metadata: - name: {{ .Release.Name }}-{{ .Values.server.name }} - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- range $key, $value := .Values.server.ingress.labels }} - {{ $key }}: {{ $value | quote }} - {{- end }} - annotations: - {{- range $key, $value := .Values.server.ingress.annotations }} - {{ $key }}: {{ $value | quote }} - {{- end }} -spec: - rules: - {{- range .Values.server.ingress.hosts }} - - host: {{ . }} - http: - paths: - {{- if $.Values.server.ingress.paths }} - {{- range $.Values.server.ingress.paths }} - - backend: - serviceName: {{ .serviceName }} - servicePort: {{ .servicePort }} - {{- end }} - {{- end }} - - backend: - serviceName: {{ $serviceName }} - servicePort: {{ $servicePort }} - {{- end -}} - {{- if .Values.server.ingress.tls }} - tls: -{{ toYaml .Values.server.ingress.tls | indent 4 }} - {{- end -}} -{{- end -}} -{{- end -}} diff --git a/charts/argo/templates/server-sa.yaml b/charts/argo/templates/server-sa.yaml deleted file mode 100644 index 5b419a65..00000000 --- a/charts/argo/templates/server-sa.yaml +++ /dev/null @@ -1,8 +0,0 @@ -{{- if and .Values.server.enabled .Values.server.createServiceAccount -}} -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.server.serviceAccount }} - annotations: -{{ toYaml .Values.server.serviceAccountAnnotations | indent 4 }} -{{- end -}} diff --git a/charts/argo/templates/server-service.yaml b/charts/argo/templates/server-service.yaml deleted file mode 100644 index ba4d74f6..00000000 --- a/charts/argo/templates/server-service.yaml +++ /dev/null @@ -1,33 +0,0 @@ -{{- if .Values.server.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-{{ .Values.server.name }} - labels: - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.server.serviceLabels }} - {{- toYaml .Values.server.serviceLabels | nindent 4 }} - {{- end }} - {{- if .Values.server.serviceAnnotations }} - annotations: -{{ toYaml .Values.server.serviceAnnotations | indent 4}}{{- end }} -spec: - ports: - - port: {{ .Values.server.servicePort }} - {{- if .Values.server.servicePortName }} - name: {{ .Values.server.servicePortName }} - {{- end }} - targetPort: 2746 - selector: - app: {{ .Release.Name }}-{{ .Values.server.name }} - sessionAffinity: None - type: {{ .Values.server.serviceType }} - {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerIP }} - loadBalancerIP: {{ .Values.server.loadBalancerIP | quote }} - {{- end }} - {{- if and (eq .Values.server.serviceType "LoadBalancer") .Values.server.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.server.loadBalancerSourceRanges | indent 4 }}{{- end }} -{{- end -}} diff --git a/charts/argo/templates/worfkflow-controller-secrets-access.yaml b/charts/argo/templates/worfkflow-controller-secrets-access.yaml deleted file mode 100644 index f0d48519..00000000 --- a/charts/argo/templates/worfkflow-controller-secrets-access.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{ if .Values.minio.install }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}}-minio-secret -rules: -- apiGroups: - - "" - resources: - - secrets - resourceNames: - - {{ .Values.artifactRepository.s3.accessKeySecret.name | default (printf "%s-%s" .Release.Name "minio") | quote }} - - {{ .Values.artifactRepository.s3.secretKeySecret.name | default (printf "%s-%s" .Release.Name "minio") | quote }} - verbs: - - get - - watch - - list -{{- end }} \ No newline at end of file diff --git a/charts/argo/templates/workflow-controller-deployment.yaml b/charts/argo/templates/workflow-controller-deployment.yaml deleted file mode 100755 index 9ad509d0..00000000 --- a/charts/argo/templates/workflow-controller-deployment.yaml +++ /dev/null @@ -1,94 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}} - labels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} -spec: - replicas: {{ .Values.controller.replicas }} - selector: - matchLabels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - release: {{ .Release.Name }} - template: - metadata: - labels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - release: {{ .Release.Name }} - {{- if .Values.controller.podLabels }} - {{ toYaml .Values.controller.podLabels | nindent 8}} - {{- end }} - {{- if .Values.controller.podAnnotations }} - annotations: -{{ toYaml .Values.controller.podAnnotations | indent 8}}{{- end }} - spec: - serviceAccountName: {{ .Values.controller.serviceAccount | quote }} - {{- if .Values.controller.podSecurityContext }} - securityContext: - {{- toYaml .Values.controller.podSecurityContext | nindent 8 }} - {{- end }} - containers: - - name: controller - image: "{{ .Values.images.namespace }}/{{ .Values.images.controller }}:{{ default .Values.images.tag .Values.controller.image.tag }}" - imagePullPolicy: {{ .Values.images.pullPolicy }} - command: [ "workflow-controller" ] - args: - - "--configmap" - - "{{ .Release.Name }}-{{ .Values.controller.name}}-configmap" - - "--executor-image" - - "{{ .Values.images.namespace }}/{{ .Values.images.executor }}:{{ default .Values.images.tag .Values.executor.image.tag }}" - - "--loglevel" - - "{{ .Values.controller.logging.level }}" - - "--gloglevel" - - "{{ .Values.controller.logging.globallevel }}" - {{- if .Values.singleNamespace }} - - "--namespaced" - {{- end }} - {{- with .Values.controller.workflowWorkers }} - - "--workflow-workers" - - {{ . | quote }} - {{- end }} - {{- with .Values.controller.podWorkers }} - - "--pod-workers" - - {{ . | quote }} - {{- end }} - {{- if .Values.controller.extraArgs }} - {{- toYaml .Values.controller.extraArgs | nindent 10 }} - {{- end }} - env: - - name: ARGO_NAMESPACE - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.namespace - {{- with .Values.controller.extraEnv }} - {{ toYaml . | nindent 10 }} - {{- end }} - resources: - {{- toYaml .Values.controller.resources | nindent 12 }} - {{- if .Values.controller.metricsConfig.enabled }} - ports: - - containerPort: 8080 - {{- end }} - {{- with .Values.images.pullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controller.nodeSelector }} - nodeSelector: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controller.tolerations }} - tolerations: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- with .Values.controller.affinity }} - affinity: - {{- toYaml . | nindent 8 }} - {{- end }} - {{- if .Values.controller.priorityClassName }} - priorityClassName: {{ .Values.controller.priorityClassName }} - {{- end }} diff --git a/charts/argo/templates/workflow-controller-minio-secret-crb.yaml b/charts/argo/templates/workflow-controller-minio-secret-crb.yaml deleted file mode 100644 index 722776a4..00000000 --- a/charts/argo/templates/workflow-controller-minio-secret-crb.yaml +++ /dev/null @@ -1,25 +0,0 @@ -{{ if .Values.minio.install }} -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name}}-minio-binding -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: Role - name: {{ .Release.Name }}-{{ .Values.controller.name}}-minio-secret -subjects: - - kind: ServiceAccount - name: {{ .Values.controller.serviceAccount }} - namespace: {{ .Release.Namespace }} -{{- if .Values.controller.workflowNamespaces }} -{{- $uiServiceAccount := .Values.controller.serviceAccount }} -{{- $namespace := .Release.Namespace }} -{{- range $key := .Values.controller.workflowNamespaces }} - {{- if not (eq $key $namespace) }} - - kind: ServiceAccount - name: {{ $uiServiceAccount }} - namespace: {{ $key }} - {{- end }} -{{- end }} -{{- end }} -{{- end }} \ No newline at end of file diff --git a/charts/argo/templates/workflow-controller-sa.yaml b/charts/argo/templates/workflow-controller-sa.yaml deleted file mode 100644 index 02d274da..00000000 --- a/charts/argo/templates/workflow-controller-sa.yaml +++ /dev/null @@ -1,6 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ .Values.controller.serviceAccount }} - annotations: -{{ toYaml .Values.controller.serviceAccountAnnotations | indent 4 }} diff --git a/charts/argo/templates/workflow-controller-service.yaml b/charts/argo/templates/workflow-controller-service.yaml deleted file mode 100644 index 7985a54c..00000000 --- a/charts/argo/templates/workflow-controller-service.yaml +++ /dev/null @@ -1,38 +0,0 @@ -{{- if or .Values.controller.metricsConfig.enabled .Values.controller.telemetryConfig.enabled }} -apiVersion: v1 -kind: Service -metadata: - name: {{ .Release.Name }}-{{ .Values.controller.name }} - labels: - app: {{ .Release.Name }}-{{ .Values.controller.name}} - chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} - release: {{ .Release.Name }} - heritage: {{ .Release.Service }} - {{- if .Values.controller.serviceLabels }} - {{ toYaml .Values.controller.serviceLabels | nindent 4}} - {{- end }} - {{- if .Values.controller.serviceAnnotations }} - annotations: -{{ toYaml .Values.controller.serviceAnnotations | indent 4}}{{- end }} -spec: - ports: - {{- if .Values.controller.metricsConfig.enabled }} - - name: {{ .Values.controller.metricsServicePortName }} - port: {{ .Values.controller.metricsServicePort }} - protocol: TCP - targetPort: {{ .Values.controller.metricsConfig.port }} - {{- end }} - {{- if .Values.controller.telemetryConfig.enabled }} - - name: {{ .Values.controller.telemetryServicePortName }} - port: {{ .Values.controller.telemetryServicePort }} - protocol: TCP - targetPort: {{ .Values.controller.telemetryConfig.port }} - {{- end }} - selector: - app: {{ .Release.Name }}-{{ .Values.controller.name }} - sessionAffinity: None - type: {{ .Values.controller.serviceType }} - {{- if and (eq .Values.controller.serviceType "LoadBalancer") .Values.controller.loadBalancerSourceRanges }} - loadBalancerSourceRanges: -{{ toYaml .Values.controller.loadBalancerSourceRanges | indent 4 }}{{- end }} -{{- end -}} diff --git a/charts/argo/templates/workflow-crd.yaml b/charts/argo/templates/workflow-crd.yaml deleted file mode 100644 index 44a6fa98..00000000 --- a/charts/argo/templates/workflow-crd.yaml +++ /dev/null @@ -1,28 +0,0 @@ -{{- if .Values.installCRD }} -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: workflows.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - additionalPrinterColumns: - - JSONPath: .status.phase - description: Status of the workflow - name: Status - type: string - - JSONPath: .status.startedAt - description: When the workflow was started - format: date-time - name: Age - type: date - group: argoproj.io - names: - kind: Workflow - plural: workflows - shortNames: - - wf - scope: Namespaced - version: v1alpha1 -{{- end }} diff --git a/charts/argo/templates/workflow-template-crd.yaml b/charts/argo/templates/workflow-template-crd.yaml deleted file mode 100644 index 757fa098..00000000 --- a/charts/argo/templates/workflow-template-crd.yaml +++ /dev/null @@ -1,18 +0,0 @@ -{{- if .Values.installCRD }} -apiVersion: apiextensions.k8s.io/v1 -kind: CustomResourceDefinition -metadata: - name: workflowtemplates.argoproj.io - annotations: - helm.sh/hook: crd-install - helm.sh/hook-delete-policy: before-hook-creation -spec: - group: argoproj.io - version: v1alpha1 - scope: Namespaced - names: - kind: WorkflowTemplate - plural: workflowtemplates - shortNames: - - wftmpl -{{- end }} diff --git a/charts/argo-applicationset/.helmignore b/charts/argocd-applicationset/.helmignore similarity index 100% rename from charts/argo-applicationset/.helmignore rename to charts/argocd-applicationset/.helmignore diff --git a/charts/argo-applicationset/Chart.yaml b/charts/argocd-applicationset/Chart.yaml similarity index 87% rename from charts/argo-applicationset/Chart.yaml rename to charts/argocd-applicationset/Chart.yaml index 6973c1c1..936734b0 100644 --- a/charts/argo-applicationset/Chart.yaml +++ b/charts/argocd-applicationset/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: argocd-applicationset description: A Helm chart for installing ArgoCD ApplicationSet type: application -version: 0.1.0 -appVersion: "v0.1.0-prerelease" +version: 0.1.5 +appVersion: "v0.1.0" home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argo-applicationset/README.md b/charts/argocd-applicationset/README.md similarity index 81% rename from charts/argo-applicationset/README.md rename to charts/argocd-applicationset/README.md index 5cc51a1a..b200d9cf 100644 --- a/charts/argo-applicationset/README.md +++ b/charts/argocd-applicationset/README.md @@ -18,7 +18,7 @@ To install the chart with the release name `my-release`: $ helm repo add argo https://argoproj.github.io/argo-helm "argo" has been added to your repositories -$ helm install --name my-release argo/argo-applicationset +$ helm install --name my-release argo/argocd-applicationset NAME: my-release ... ``` @@ -27,6 +27,17 @@ NAME: my-release Users of Helm v3 should set the `installCRDs` value to `false` to avoid warnings about nonexistent webhooks. +### Testing + +Users can test the chart with [kind](https://kind.sigs.k8s.io/) and [ct](https://github.com/helm/chart-testing). + +```console +kind create cluster +kubectl create namespace argocd +kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml +ct install --namespace argocd +``` + ## Values | Key | Type | Default | Description | @@ -46,7 +57,11 @@ Users of Helm v3 should set the `installCRDs` value to `false` to avoid warnings | image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion. | | imagePullSecrets | list | `[]` | If defined, uses a Secret to pull an image from a private Docker registry or repository. | | installCRDs | bool | `true` | Install Custom Resource Definition | -| nameOverride | string | `""` | Provide a name in place of `argo-applicationset` | +| mountSSHKnownHostsVolume | bool | `true` | Mount the `argocd-ssh-known-hosts-cm` volume | +| mountTLSCertsVolume | bool | `true` | Mount the `argocd-tls-certs-cm` volume | +| mountGPGKeysVolume | bool | `false` | Mount the `argocd-gpg-keys-cm` volume | +| mountGPGKeyringVolume | bool | `true` | Mount an emptyDir volume for `gpg-keyring` | +| nameOverride | string | `""` | Provide a name in place of `argocd-applicationset` | | nodeSelector | object | `{}` | [Node selector](https://kubernetes.io/docs/user-guide/node-selection/) | | podAnnotations | object | `{}` | Annotations for the controller pods | | podSecurityContext | object | `{}` | Pod Security Context | diff --git a/charts/argocd-applicationset/ci/default-values.yaml b/charts/argocd-applicationset/ci/default-values.yaml new file mode 100644 index 00000000..eb1b7aae --- /dev/null +++ b/charts/argocd-applicationset/ci/default-values.yaml @@ -0,0 +1,77 @@ +# Default values for argo-applicationset. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +installCRDs: false # this needs to be false with ct + +image: + # The image repository + repository: quay.io/argocdapplicationset/argocd-applicationset + # Image pull policy + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +args: + metricsAddr: :8080 + probeBindAddr: :8081 + enableLeaderElection: false + namespace: argocd + argocdRepoServer: argocd-repo-server:8081 + policy: sync + debug: false + dryRun: false + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +rbac: + pspEnabled: true + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} + +mountSSHKnownHostsVolume: true +mountTLSCertsVolume: true +mountGPGKeysVolume: false +mountGPGKeyringVolume: true diff --git a/charts/argocd-applicationset/ci/leader-election-values.yaml b/charts/argocd-applicationset/ci/leader-election-values.yaml new file mode 100644 index 00000000..e7201ac1 --- /dev/null +++ b/charts/argocd-applicationset/ci/leader-election-values.yaml @@ -0,0 +1,6 @@ +args: + enableLeaderElection: true + +replicaCount: 3 + +installCRDs: false diff --git a/charts/argo-applicationset/crds/crd-applicationset.yaml b/charts/argocd-applicationset/crds/crd-applicationset.yaml similarity index 100% rename from charts/argo-applicationset/crds/crd-applicationset.yaml rename to charts/argocd-applicationset/crds/crd-applicationset.yaml diff --git a/charts/argo-applicationset/templates/_helpers.tpl b/charts/argocd-applicationset/templates/_helpers.tpl similarity index 96% rename from charts/argo-applicationset/templates/_helpers.tpl rename to charts/argocd-applicationset/templates/_helpers.tpl index 4d0e98b5..e86139e1 100644 --- a/charts/argo-applicationset/templates/_helpers.tpl +++ b/charts/argocd-applicationset/templates/_helpers.tpl @@ -40,7 +40,6 @@ helm.sh/chart: {{ include "argo-applicationset.chart" . }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} app.kubernetes.io/managed-by: {{ .Release.Service }} -app.kubernetes.io/name: {{ include "argo-applicationset.name" . }} app.kubernetes.io/part-of: argo-cd-applicationset app.kubernetes.io/component: controller {{- end }} diff --git a/charts/argo-applicationset/templates/crds.yaml b/charts/argocd-applicationset/templates/crds.yaml similarity index 100% rename from charts/argo-applicationset/templates/crds.yaml rename to charts/argocd-applicationset/templates/crds.yaml diff --git a/charts/argo-applicationset/templates/deployment.yaml b/charts/argocd-applicationset/templates/deployment.yaml similarity index 66% rename from charts/argo-applicationset/templates/deployment.yaml rename to charts/argocd-applicationset/templates/deployment.yaml index 10ebe70f..d2cd345c 100644 --- a/charts/argo-applicationset/templates/deployment.yaml +++ b/charts/argocd-applicationset/templates/deployment.yaml @@ -49,6 +49,43 @@ spec: protocol: TCP resources: {{- toYaml .Values.resources | nindent 12 }} + volumeMounts: + {{- if .Values.mountSSHKnownHostsVolume }} + - mountPath: /app/config/ssh + name: ssh-known-hosts + {{- end }} + {{- if .Values.mountTLSCertsVolume }} + - mountPath: /app/config/tls + name: tls-certs + {{- end }} + {{- if .Values.mountGPGKeysVolume }} + - mountPath: /app/config/gpg/source + name: gpg-keys + {{- end }} + {{- if .Values.mountGPGKeyringVolume }} + - mountPath: /app/config/gpg/keys + name: gpg-keyring + {{- end }} + volumes: + {{- if .Values.mountSSHKnownHostsVolume }} + - configMap: + name: argocd-ssh-known-hosts-cm + name: ssh-known-hosts + {{- end }} + {{- if .Values.mountTLSCertsVolume }} + - configMap: + name: argocd-tls-certs-cm + name: tls-certs + {{- end }} + {{- if .Values.mountGPGKeysVolume }} + - configMap: + name: argocd-gpg-keys-cm + name: gpg-keys + {{- end }} + {{- if .Values.mountGPGKeyringVolume }} + - emptyDir: {} + name: gpg-keyring + {{- end }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} diff --git a/charts/argo-applicationset/templates/psp.yaml b/charts/argocd-applicationset/templates/psp.yaml similarity index 100% rename from charts/argo-applicationset/templates/psp.yaml rename to charts/argocd-applicationset/templates/psp.yaml diff --git a/charts/argo-applicationset/templates/rbac.yaml b/charts/argocd-applicationset/templates/rbac.yaml similarity index 64% rename from charts/argo-applicationset/templates/rbac.yaml rename to charts/argocd-applicationset/templates/rbac.yaml index 8610a2f3..1181e3d2 100644 --- a/charts/argo-applicationset/templates/rbac.yaml +++ b/charts/argocd-applicationset/templates/rbac.yaml @@ -6,73 +6,81 @@ metadata: {{- include "argo-applicationset.labels" . | nindent 4 }} rules: - apiGroups: - - argoproj.io + - argoproj.io resources: - - applications - - applicationsets - - applicationsets/finalizers - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - argoproj.io - resources: - - applicationsets/status - verbs: - - get - - patch - - update - - apiGroups: - - '' - resources: - - events - verbs: - - create - - delete - - get - - list - - patch - - update - - watch - - apiGroups: - - '' - resources: - - secrets - verbs: - - get - - list - - watch - - apiGroups: - - '' - resources: - - configmaps + - applications + - appprojects + - applicationsets + - applicationsets/finalizers verbs: + - create + - delete - get - list - - watch - - create - - update - patch - - delete + - update + - watch - apiGroups: - - '' + - argoproj.io resources: - - configmaps/status + - applicationsets/status verbs: - get - - update - patch + - update - apiGroups: - - '' + - "" resources: - events verbs: - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - apiGroups: + - "" + resources: + - configmaps + verbs: + - create + - delete + - get + - list + - patch + - update + - watch + - apiGroups: + - apps + - extensions + resources: + - deployments + verbs: + - get + - list + - watch + - apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - create + - delete + - get + - list + - patch + - update + - watch --- apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding diff --git a/charts/argo-applicationset/templates/serviceaccount.yaml b/charts/argocd-applicationset/templates/serviceaccount.yaml similarity index 100% rename from charts/argo-applicationset/templates/serviceaccount.yaml rename to charts/argocd-applicationset/templates/serviceaccount.yaml diff --git a/charts/argo-applicationset/values.yaml b/charts/argocd-applicationset/values.yaml similarity index 93% rename from charts/argo-applicationset/values.yaml rename to charts/argocd-applicationset/values.yaml index 9a69f216..f7be897d 100644 --- a/charts/argo-applicationset/values.yaml +++ b/charts/argocd-applicationset/values.yaml @@ -70,3 +70,8 @@ nodeSelector: {} tolerations: [] affinity: {} + +mountSSHKnownHostsVolume: true +mountTLSCertsVolume: true +mountGPGKeysVolume: false +mountGPGKeyringVolume: true diff --git a/charts/argocd-notifications/Chart.yaml b/charts/argocd-notifications/Chart.yaml index b3853226..714b0474 100644 --- a/charts/argocd-notifications/Chart.yaml +++ b/charts/argocd-notifications/Chart.yaml @@ -1,9 +1,9 @@ apiVersion: v2 -appVersion: 1.0.2 +appVersion: 1.1.1 description: A Helm chart for ArgoCD notifications, an add-on to ArgoCD. name: argocd-notifications type: application -version: 1.0.15 +version: 1.3.1 home: https://github.com/argoproj/argo-helm icon: https://raw.githubusercontent.com/argoproj/argo/master/docs/assets/argo.png keywords: diff --git a/charts/argocd-notifications/templates/bots/slack/role.yaml b/charts/argocd-notifications/templates/bots/slack/role.yaml index b509f6d4..5193a109 100644 --- a/charts/argocd-notifications/templates/bots/slack/role.yaml +++ b/charts/argocd-notifications/templates/bots/slack/role.yaml @@ -4,6 +4,15 @@ kind: Role metadata: name: {{ include "argocd-notifications.name" . }}-bot rules: +- apiGroups: + - "" + resources: + - secrets + - configmaps + verbs: + - get + - list + - watch - apiGroups: - argoproj.io resources: @@ -15,13 +24,4 @@ rules: - watch - update - patch -- apiGroups: - - "" - resources: - - secrets - - configmaps - verbs: - - get - - list - - watch {{ end }} diff --git a/charts/argocd-notifications/templates/configmap.yaml b/charts/argocd-notifications/templates/configmap.yaml index 9090a162..37f95b53 100644 --- a/charts/argocd-notifications/templates/configmap.yaml +++ b/charts/argocd-notifications/templates/configmap.yaml @@ -1,3 +1,4 @@ +{{ if .Values.cm.create }} apiVersion: v1 kind: ConfigMap metadata: @@ -7,6 +8,9 @@ metadata: data: context: | argocdUrl: {{ .Values.argocdUrl | quote }} + {{- with .Values.context }} + {{- toYaml . | nindent 4 }} + {{- end }} {{- with .Values.notifiers }} {{- toYaml . | nindent 2 }} {{- end }} @@ -19,4 +23,5 @@ data: {{- end }} {{- with .Values.triggers }} {{- toYaml . | nindent 2 }} - {{- end }} \ No newline at end of file + {{- end }} +{{- end }} diff --git a/charts/argocd-notifications/templates/deployment.yaml b/charts/argocd-notifications/templates/deployment.yaml index bc6948d3..0e18f698 100644 --- a/charts/argocd-notifications/templates/deployment.yaml +++ b/charts/argocd-notifications/templates/deployment.yaml @@ -26,8 +26,9 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} serviceAccountName: {{ include "argocd-notifications.serviceAccountName" . }} - securityContext: - runAsNonRoot: true + {{- if .Values.securityContext }} + securityContext: {{- toYaml .Values.securityContext | nindent 8 }} + {{- end }} containers: - name: {{ include "argocd-notifications.name" . }}-controller image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" @@ -51,6 +52,9 @@ spec: name: metrics protocol: TCP {{- end }} + {{- if .Values.containerSecurityContext }} + securityContext: {{- toYaml .Values.containerSecurityContext | nindent 12 }} + {{- end }} {{- with .Values.extraEnv }} env: {{ toYaml . | nindent 12 }} {{- end }} diff --git a/charts/argocd-notifications/templates/role.yaml b/charts/argocd-notifications/templates/role.yaml index fcd99ef6..0b07afd7 100644 --- a/charts/argocd-notifications/templates/role.yaml +++ b/charts/argocd-notifications/templates/role.yaml @@ -19,9 +19,24 @@ rules: - apiGroups: - "" resources: + - configmaps - secrets + verbs: + - list + - watch +- apiGroups: + - "" + resourceNames: + - {{ include "argocd-notifications.name" . }}-cm + resources: - configmaps verbs: - get - - list - - watch +- apiGroups: + - "" + resourceNames: + - {{ include "argocd-notifications.name" . }}-secret + resources: + - secrets + verbs: + - get \ No newline at end of file diff --git a/charts/argocd-notifications/values.yaml b/charts/argocd-notifications/values.yaml index ae3fda8f..bfe746c3 100644 --- a/charts/argocd-notifications/values.yaml +++ b/charts/argocd-notifications/values.yaml @@ -7,7 +7,7 @@ fullnameOverride: "" image: repository: argoprojlabs/argocd-notifications - tag: v1.0.2 + tag: v1.1.1 pullPolicy: IfNotPresent imagePullSecrets: [] @@ -19,6 +19,11 @@ nodeSelector: {} updateStrategy: type: Recreate +context: + # Add custom values into context + # region: east + # environmentName: staging + secret: # Whether helm chart creates controller secret create: true @@ -65,6 +70,13 @@ notifiers: podAnnotations: {} +## Pod Security Context +securityContext: + runAsNonRoot: true + +## Container Security Context +containerSecurityContext: {} + resources: {} # limits: # cpu: 100m @@ -81,6 +93,10 @@ serviceAccount: # If not set and create is true, a name is generated using the fullname template name: argocd-notifications-controller +cm: + # Whether helm chart creates controller config map + create: true + subscriptions: # For more information: https://argocd-notifications.readthedocs.io/en/stable/subscriptions/ @@ -337,7 +353,7 @@ bots: image: repository: argoprojlabs/argocd-notifications - tag: v1.0.1 + tag: v1.1.1 pullPolicy: IfNotPresent imagePullSecrets: [] diff --git a/scripts/lint.sh b/scripts/lint.sh index 8f084c5b..1f0e9104 100755 --- a/scripts/lint.sh +++ b/scripts/lint.sh @@ -1,19 +1,17 @@ #!/bin/bash +# This script runs the chart-testing tool locally. It simulates the linting that is also done by the github action. Run this without any errors before pushing. +# Reference: https://github.com/helm/chart-testing set -eux SRCROOT="$(cd "$(dirname "$0")/.." && pwd)" -for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); -do - rm -rf $dir/charts - name=$(basename $dir) - echo "Running Helm linting for $name" - docker run \ - -v "$SRCROOT:/workdir" \ - gcr.io/kubernetes-charts-ci/test-image:v3.1.0 \ - ct \ - lint \ - --config .circleci/chart-testing.yaml \ - --lint-conf .circleci/lintconf.yaml \ - --charts "/workdir/charts/${name}" -done +echo -e "\n-- Linting all Helm Charts --\n" +docker run \ + -v "$SRCROOT:/workdir" \ + --entrypoint /bin/sh \ + quay.io/helmpack/chart-testing:v3.3.1 \ + -c cd /workdir \ + ct lint \ + --config .github/configs/ct-lint.yaml \ + --lint-conf .github/configs/lintconf.yaml \ + --debug diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100755 index 025ba5d9..00000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash -set -eux - -SRCROOT="$(cd "$(dirname "$0")/.." && pwd)" -GIT_PUSH=${GIT_PUSH:-false} - -rm -rf $SRCROOT/output && git clone -b gh-pages git@github.com:argoproj/argo-helm.git $SRCROOT/output - -helm repo add argoproj https://argoproj.github.io/argo-helm - -for dir in $(find $SRCROOT/charts -mindepth 1 -maxdepth 1 -type d); -do - rm -rf $dir/charts - - name=$(basename $dir) - - if [ $(helm dep list $dir 2>/dev/null| wc -l) -gt 1 ] - then - echo "Processing chart dependencies" - helm --debug dep build $dir - # Bug with Helm subcharts with hyphen on them - # https://github.com/argoproj/argo-helm/pull/270#issuecomment-608695684 - if [ "$name" == "argo-cd" ] - then - echo "Restore ArgoCD RedisHA subchart" - tar -C $dir/charts -xf $dir/charts/redis-ha-*.tgz - fi - fi - - echo "Processing $dir" - helm --debug package $dir -done - -cp $SRCROOT/*.tgz output/ -cd $SRCROOT/output && helm repo index . - -cd $SRCROOT/output && git status - -if [ "$GIT_PUSH" == "true" ] -then - cd $SRCROOT/output && git add . && git commit -m "Publish charts" && git push git@github.com:argoproj/argo-helm.git gh-pages -fi