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 RBAC
Signed-off-by: Qing Ye <ye.qing@gojek.com>
  • Loading branch information
Qing Ye committed Dec 4, 2021
commit 0bf042a5c3a5096ee13bbb0056a9311efa0b16c2
2 changes: 1 addition & 1 deletion charts/argo-cd/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ dependencies:
condition: redis-ha.enabled
annotations:
artifacthub.io/changes: |
- "[Added]: add extension support"
- "[Added]: add extensions support"
6 changes: 3 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.extension }}
{{- if .Values.server.extensions }}
- name: extensions
mountPath: /tmp/extensions/
{{- end }}
Expand Down Expand Up @@ -136,7 +136,7 @@ spec:
{{- with .Values.server.extraContainers }}
{{- toYaml . | nindent 6 }}
{{- end }}
{{- if .Values.server.extension }}
{{- if .Values.server.extensions }}
- name: argocd-extensions
image: ghcr.io/argoproj-labs/argocd-extensions:latest
volumeMounts:
Expand Down Expand Up @@ -175,7 +175,7 @@ spec:
{{- if .Values.server.volumes }}
{{- toYaml .Values.server.volumes | nindent 6}}
{{- end }}
{{- if .Values.server.extension }}
{{- if .Values.server.extensions }}
- name: extensions
emptyDir: {}
{{- end }}
Expand Down
17 changes: 17 additions & 0 deletions charts/argo-cd/templates/argocd-server/extensions-rolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if .Values.server.extensions }}
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
name: argocd-server-extensions
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: argocd-server-extensions
subjects:
- kind: ServiceAccount
name: argocd-server
{{- end }}
23 changes: 23 additions & 0 deletions charts/argo-cd/templates/argocd-server/extentions-role.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{- if .Values.server.extensions }}
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
name: argocd-server-extensions
rules:
- apiGroups:
- argoproj.io
resources:
- argocdextensions
verbs:
- create
- get
- list
- watch
- update
- delete
- patch
{{- end }}
4 changes: 2 additions & 2 deletions charts/argo-cd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1276,8 +1276,8 @@ server:
# name: custom-tools
# subPath: helm

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

## Repo Server
repoServer:
Expand Down