Skip to content

Commit

Permalink
Add operator permissions for argocd appications (#122)
Browse files Browse the repository at this point in the history
add a clusterrole rule to allow applications integration for auto-sync
pause feature

```yaml
- apiGroups:
  - argoproj.io
  resources:
  - applications
  verbs:
  - list
  - get
  - patch
```
  • Loading branch information
DmitryDodzin authored Nov 20, 2024
1 parent 56543e5 commit 4808d13
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 1 deletion.
2 changes: 1 addition & 1 deletion mirrord-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.10.4
version: 1.10.5

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 10 additions & 0 deletions mirrord-operator/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,16 @@ rules:
- list
- watch
{{- end }}
{{- if .Values.operator.applicationPauseAutoSync }}
- apiGroups:
- argoproj.io
resources:
- applications
verbs:
- list
- get
- patch
{{- end }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
Expand Down
4 changes: 4 additions & 0 deletions mirrord-operator/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ spec:
value: {{ .Values.operator.sqsSplitting | ternary "true" "false" | quote }}
- name: OPERATOR_KAFKA_SPLITTING
value: {{ .Values.operator.kafkaSplitting | ternary "true" "false" | quote }}
{{- if .Values.operator.applicationPauseAutoSync }}
- name: OPERATOR_APPLICATION_PAUSE_AUTO_SYNC
value: "true"
{{- end }}
- name: OPERATOR_JSON_LOG
value: {{ .Values.operator.jsonLog | ternary "true" "false" | quote }}
- name: OPERATOR_AGENT_CONFIG
Expand Down
3 changes: 3 additions & 0 deletions mirrord-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ operator:
sqsSplitting: false
# Has to be set to `true` in order to use the Kafka queue splitting feature.
kafkaSplitting: false
# Has to be set to `true` in order to use the argocd application auto-sync pause feature.
applicationPauseAutoSync: false

# imagePullSecrets:
# - name: value

Expand Down

0 comments on commit 4808d13

Please sign in to comment.