Skip to content
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

feat(argo-cd): Add support for extension #1050

Merged
merged 12 commits into from
Dec 10, 2021
Prev Previous commit
Next Next commit
add more control to extensions values and update readme
Signed-off-by: Qing Ye <ye.qing@gojek.com>
  • Loading branch information
Qing Ye committed Dec 4, 2021
commit 12fda8cf54f0d31927729ed0c0ccf56ca94b6a95
5 changes: 5 additions & 0 deletions charts/argo-cd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,11 @@ NAME: my-release
| server.containerSecurityContext | object | `{}` | Servers container-level security context |
| server.env | list | `[]` | Environment variables to pass to Argo CD server |
| server.envFrom | list | `[]` (See [values.yaml]) | envFrom to pass to Argo CD server |
| server.extensions.contents | list | `[]` | Extensions to be loaded into the server |
| server.extensions.enabled | bool | `false` | Enable support for extensions |
| server.extensions.image.imagePullPolicy | string | `"IfNotPresent"` | Image pull policy for extensions |
| server.extensions.image.repository | string | `"ghcr.io/argoproj-labs/argocd-extensions"` | Repository to use for extensions image |
| server.extensions.image.tag | string | `"v0.1.0"` | Tag to use for extensions image |
| server.extraArgs | list | `[]` | Additional command line arguments to pass to Argo CD server |
| server.extraContainers | list | `[]` | Additional containers to be added to the server pod |
| server.image.imagePullPolicy | string | `""` (defaults to global.image.imagePullPolicy) | Image pull policy for the Argo CD server |
Expand Down
3 changes: 3 additions & 0 deletions charts/argo-cd/crds/crd-extension.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: argocdextensions.argoproj.io
app.kubernetes.io/part-of: argocd
annotations:
controller-gen.kubebuilder.io/version: v0.4.1
name: argocdextensions.argoproj.io
Expand Down
7 changes: 4 additions & 3 deletions charts/argo-cd/templates/argocd-server/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ spec:
{{- if .Values.server.volumeMounts }}
{{- toYaml .Values.server.volumeMounts | nindent 8}}
{{- end }}
{{- if .Values.server.extensions }}
{{- if .Values.server.extensions.enabled }}
- name: extensions
mountPath: /tmp/extensions/
{{- end }}
Expand Down Expand Up @@ -136,9 +136,10 @@ spec:
{{- with .Values.server.extraContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.server.extensions }}
{{- if .Values.server.extensions.enabled }}
- name: argocd-extensions
image: ghcr.io/argoproj-labs/argocd-extensions:latest
image: {{ .Values.server.extensions.image.repository }}:{{ .Values.server.extensions.image.tag }}
imagePullPolicy: {{ .Values.server.extensions.image.imagePullPolicy }}
volumeMounts:
- name: extensions
mountPath: /tmp/extensions/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
labels:
app.kubernetes.io/name: argocd-server
app.kubernetes.io/part-of: argocd
app.kubernetes.io/component: server
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
name: argocd-server-extensions
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -14,4 +12,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: argocd-server
{{- end }}
{{- end }}
4 changes: 1 addition & 3 deletions charts/argo-cd/templates/argocd-server/extentions-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
labels:
app.kubernetes.io/name: argocd-server
app.kubernetes.io/part-of: argocd
app.kubernetes.io/component: server
{{- include "argo-cd.labels" (dict "context" . "component" .Values.server.name "name" .Values.server.name) | nindent 4 }}
name: argocd-server-extensions
rules:
- apiGroups:
Expand Down
18 changes: 16 additions & 2 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,22 @@ server:
# name: custom-tools
# subPath: helm

# -- Enable support for extensions
extensions: false
extensions:
# -- Enable support for extensions
enabled: false

image:
# -- Repository to use for extensions image
repository: "ghcr.io/argoproj-labs/argocd-extensions"
# -- Tag to use for extensions image
tag: "v0.1.0"
# -- Image pull policy for extensions
imagePullPolicy: IfNotPresent

# -- Extensions to be loaded into the server
contents: []
# - name: argo-rollouts
# url: https://github.com/argoproj-labs/rollout-extension/releases/download/v0.1.0/extension.tar

## Repo Server
repoServer:
Expand Down