-
Notifications
You must be signed in to change notification settings - Fork 7k
Update manifests to support in-cluster installations #634
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,22 @@ | ||
| #!/bin/sh | ||
|
|
||
| IMAGE_NAMESPACE=${IMAGE_NAMESPACE:='argoproj'} | ||
| IMAGE_TAG=${IMAGE_TAG:='latest'} | ||
| SRCROOT="$( cd "$(dirname "$0")/.." ; pwd -P )" | ||
| AUTOGENMSG="# This is an auto-generated file. DO NOT EDIT" | ||
|
|
||
| for i in "$(ls manifests/components/*.yaml)"; do | ||
| sed -i '' 's@\( image: \(.*\)/\(argocd-.*\):.*\)@ image: '"${IMAGE_NAMESPACE}"'/\3:'"${IMAGE_TAG}"'@g' $i | ||
| done | ||
| update_image () { | ||
| if [ ! -z "${IMAGE_NAMESPACE}" ]; then | ||
| sed -i '' 's| image: \(.*\)/\(argocd-.*\)| image: '"${IMAGE_NAMESPACE}"'/\2|g' ${1} | ||
| fi | ||
| if [ ! -z "${IMAGE_TAG}" ]; then | ||
| sed -i '' 's|\( image: .*/argocd-.*\)\:.*|\1:'"${IMAGE_TAG}"'|g' ${1} | ||
| fi | ||
| } | ||
|
|
||
| echo "${AUTOGENMSG}" > ${SRCROOT}/manifests/install.yaml | ||
| kustomize build ${SRCROOT}/manifests/cluster-install >> ${SRCROOT}/manifests/install.yaml | ||
| update_image ${SRCROOT}/manifests/install.yaml | ||
|
|
||
| echo "${AUTOGENMSG}" > ${SRCROOT}/manifests/namespace-install.yaml | ||
| kustomize build ${SRCROOT}/manifests/base >> ${SRCROOT}/manifests/namespace-install.yaml | ||
| update_image ${SRCROOT}/manifests/namespace-install.yaml | ||
|
|
||
| echo "# This is an auto-generated file. DO NOT EDIT" > manifests/install.yaml | ||
| cat manifests/components/*.yaml >> manifests/install.yaml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # ArgoCD Installation Manifests | ||
|
|
||
| Two sets of installation manifests are provided: | ||
|
|
||
| * [install.yaml](install.yaml) - Standard ArgoCD installation with cluster-admin access. Use this | ||
| manifest set if you plan to use ArgoCD to deploy applications in the same cluster that ArgoCD runs | ||
| in (i.e. kubernetes.svc.default). Will still be able to deploy to external clusters with inputted | ||
| credentials. | ||
|
|
||
| * [namespace-install.yaml](namespace-install.yaml) - Installation of ArgoCD which requires only | ||
| namespace level privileges (does not need cluster roles). Use this manifest set if you do not | ||
| need ArgoCD to deploy applications in the same cluster that ArgoCD runs in, and will rely solely | ||
| on inputted cluster credentials. An example of using this set of manifests is if you run several | ||
| ArgoCD instances for different teams, where each instance will bedeploying applications to | ||
| external clusters. Will still be possible to deploy to the same cluster (kubernetes.svc.default) | ||
| with inputted credentials (i.e. `argocd cluster add <CONTEXT> --in-cluster`). |
1 change: 0 additions & 1 deletion
1
...3d_application-controller-deployment.yaml → ...se/application-controller-deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...ents/03b_application-controller-role.yaml → ...sts/base/application-controller-role.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...c_application-controller-rolebinding.yaml → ...e/application-controller-rolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...onents/03a_application-controller-sa.yaml → ...fests/base/application-controller-sa.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...fests/components/01a_application-crd.yaml → manifests/base/application-crd.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
manifests/components/01b_appproject-crd.yaml → manifests/base/appproject-crd.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: apiextensions.k8s.io/v1beta1 | ||
| kind: CustomResourceDefinition | ||
| metadata: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: argocd-cm | ||
| # data: | ||
| # # ArgoCD's externally facing base URL. Required for configuring SSO | ||
| # # url: https://argo-cd-demo.argoproj.io | ||
| # | ||
| # # A dex connector configuration. See documentation on how to configure SSO: | ||
| # # https://github.com/argoproj/argo-cd/blob/master/docs/sso.md#2-configure-argocd-for-sso | ||
| # dex.config: | | ||
| # connectors: | ||
| # # GitHub example | ||
| # - type: github | ||
| # id: github | ||
| # name: GitHub | ||
| # config: | ||
| # clientID: aabbccddeeff00112233 | ||
| # clientSecret: $dex.github.clientSecret | ||
| # orgs: | ||
| # - name: your-github-org | ||
| # teams: | ||
| # - red-team |
1 change: 0 additions & 1 deletion
1
...omponents/04f_argocd-metrics-service.yaml → manifests/base/argocd-metrics-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: argocd-rbac-cm | ||
| # data: | ||
| # # An RBAC policy .csv file containing additional policy and role definitions. | ||
| # # See https://github.com/argoproj/argo-cd/blob/master/docs/rbac.md on how to write RBAC policies. | ||
| # policy.csv: | | ||
| # # Give all members of "my-org:team-alpha" the ability to sync apps in "my-project" | ||
| # p, my-org:team-alpha, applications, sync, my-project/*, allow | ||
| # # Make all members of "my-org:team-beta" admins | ||
| # g, my-org:team-beta, role:admin | ||
| # | ||
| # # The default role ArgoCD will fall back to, when authorizing API requests | ||
| # policy.default: role:readonly |
1 change: 0 additions & 1 deletion
1
...ts/05a_argocd-repo-server-deployment.yaml → ...s/base/argocd-repo-server-deployment.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...nents/05b_argocd-repo-server-service.yaml → ...ests/base/argocd-repo-server-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| apiVersion: v1 | ||
| kind: Secret | ||
| metadata: | ||
| name: argocd-secret | ||
| type: Opaque | ||
| # data: | ||
| # # TLS certificate and private key for API server. | ||
| # # Autogenerated with a self-signed ceritificate if keys are missing. | ||
| # tls.crt: | ||
| # tls.key: | ||
| # | ||
| # # bcrypt hash of the admin password and it's last modified time. Autogenerated on initial | ||
| # # startup. To reset a forgotten password, delete both keys and restart argocd-server. | ||
| # admin.password: | ||
| # admin.passwordMtime: | ||
| # | ||
| # # random server signature key for session validation. Autogenerated on initial startup | ||
| # server.secretkey: | ||
| # | ||
| # # The following keys hold the shared secret for authenticating GitHub/GitLab/BitBucket webhook | ||
| # # events. To enable webhooks, configure one or more of the following keys with the shared git | ||
| # # provider webhook secret. The payload URL configured in the git provider should use the | ||
| # # /api/webhook endpoint of your ArgoCD instance (e.g. https://argocd.example.com/api/webhook) | ||
| # github.webhook.secret: | ||
| # gitlab.webhook.secret: | ||
| # bitbucket.webhook.uuid: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...ts/components/04b_argocd-server-role.yaml → manifests/base/argocd-server-role.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: Role | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...onents/04c_argocd-server-rolebinding.yaml → ...fests/base/argocd-server-rolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...ests/components/04a_argocd-server-sa.yaml → manifests/base/argocd-server-sa.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...components/04e_argocd-server-service.yaml → manifests/base/argocd-server-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 0 additions & 4 deletions
4
...fests/components/06b_dex-server-role.yaml → manifests/base/dex-server-role.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
...omponents/06c_dex-server-rolebinding.yaml → manifests/base/dex-server-rolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: RoleBinding | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
manifests/components/06a_dex-server-sa.yaml → manifests/base/dex-server-sa.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: ServiceAccount | ||
| metadata: | ||
|
|
||
1 change: 0 additions & 1 deletion
1
...ts/components/06e_dex-server-service.yaml → manifests/base/dex-server-service.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| --- | ||
| apiVersion: v1 | ||
| kind: Service | ||
| metadata: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| resources: | ||
| - application-crd.yaml | ||
| - appproject-crd.yaml | ||
| - argocd-cm.yaml | ||
| - argocd-secret.yaml | ||
| - argocd-rbac-cm.yaml | ||
| - application-controller-sa.yaml | ||
| - application-controller-role.yaml | ||
| - application-controller-rolebinding.yaml | ||
| - application-controller-deployment.yaml | ||
| - argocd-server-sa.yaml | ||
| - argocd-server-role.yaml | ||
| - argocd-server-rolebinding.yaml | ||
| - argocd-server-deployment.yaml | ||
| - argocd-server-service.yaml | ||
| - argocd-metrics-service.yaml | ||
| - argocd-repo-server-deployment.yaml | ||
| - argocd-repo-server-service.yaml | ||
| - dex-server-sa.yaml | ||
| - dex-server-role.yaml | ||
| - dex-server-rolebinding.yaml | ||
| - dex-server-deployment.yaml | ||
| - dex-server-service.yaml | ||
|
|
||
| imageTags: | ||
| - name: argoproj/argocd-server | ||
| newTag: latest | ||
| - name: argoproj/argocd-repo-server | ||
| newTag: latest | ||
| - name: argoproj/application-controller | ||
| newTag: latest |
15 changes: 15 additions & 0 deletions
15
manifests/cluster-install/application-controller-clusterrole.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: application-controller-clusterrole | ||
| rules: | ||
| - apiGroups: | ||
| - '*' | ||
| resources: | ||
| - '*' | ||
| verbs: | ||
| - '*' | ||
| - nonResourceURLs: | ||
| - '*' | ||
| verbs: | ||
| - '*' |
12 changes: 12 additions & 0 deletions
12
manifests/cluster-install/application-controller-clusterrolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: application-controller-clusterrolebinding | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: application-controller-clusterrole | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: application-controller | ||
| namespace: argocd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRole | ||
| metadata: | ||
| name: argocd-server-clusterrole | ||
| rules: | ||
| - apiGroups: | ||
| - '*' | ||
| resources: | ||
| - '*' | ||
| verbs: | ||
| - delete |
12 changes: 12 additions & 0 deletions
12
manifests/cluster-install/argocd-server-clusterrolebinding.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apiVersion: rbac.authorization.k8s.io/v1 | ||
| kind: ClusterRoleBinding | ||
| metadata: | ||
| name: argocd-server-clusterrolebinding | ||
| roleRef: | ||
| apiGroup: rbac.authorization.k8s.io | ||
| kind: ClusterRole | ||
| name: argocd-server-clusterrole | ||
| subjects: | ||
| - kind: ServiceAccount | ||
| name: argocd-server | ||
| namespace: argocd |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.