2022-08-23 02:43:13 +00:00
|
|
|
{{- if and .Values.clusterInstall .Values.controller.createClusterRole }}
|
2020-02-12 18:57:25 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: ClusterRole
|
|
|
|
metadata:
|
2021-05-31 16:06:26 +00:00
|
|
|
name: {{ include "argo-rollouts.fullname" . }}
|
2020-02-12 18:57:25 +00:00
|
|
|
labels:
|
|
|
|
app.kubernetes.io/component: {{ .Values.controller.component }}
|
2021-05-31 16:06:26 +00:00
|
|
|
{{- include "argo-rollouts.labels" . | nindent 4 }}
|
2020-02-12 18:57:25 +00:00
|
|
|
rules:
|
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- argoproj.io
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- rollouts
|
|
|
|
- rollouts/status
|
|
|
|
- rollouts/finalizers
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
- patch
|
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- argoproj.io
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- analysisruns
|
|
|
|
- analysisruns/finalizers
|
|
|
|
- experiments
|
|
|
|
- experiments/finalizers
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- create
|
2020-02-12 18:57:25 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2021-01-21 17:48:29 +00:00
|
|
|
- update
|
2020-02-12 18:57:25 +00:00
|
|
|
- patch
|
2021-01-21 17:48:29 +00:00
|
|
|
- delete
|
2020-03-25 16:29:44 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- argoproj.io
|
2020-03-25 16:29:44 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- analysistemplates
|
|
|
|
- clusteranalysistemplates
|
2020-03-25 16:29:44 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
# replicaset access needed for managing ReplicaSets
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- apps
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- replicasets
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- create
|
2020-02-12 18:57:25 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
- patch
|
2021-01-21 17:48:29 +00:00
|
|
|
- delete
|
2021-11-15 07:02:03 +00:00
|
|
|
# deployments and podtemplates read access needed for workload reference support
|
2021-05-31 16:06:26 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
- apps
|
|
|
|
resources:
|
|
|
|
- deployments
|
|
|
|
- podtemplates
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2021-01-21 17:48:29 +00:00
|
|
|
# services patch needed to update selector of canary/stable/active/preview services
|
2022-03-23 21:11:46 +00:00
|
|
|
# services create needed to create and delete services for experiments
|
2020-10-05 17:14:50 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ""
|
2020-10-05 17:14:50 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- services
|
2020-10-05 17:14:50 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- patch
|
2021-11-15 07:02:03 +00:00
|
|
|
- create
|
2022-03-23 21:11:46 +00:00
|
|
|
- delete
|
2021-11-15 07:02:03 +00:00
|
|
|
# leases create/get/update needed for leader election
|
|
|
|
- apiGroups:
|
|
|
|
- coordination.k8s.io
|
|
|
|
resources:
|
|
|
|
- leases
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- update
|
2023-01-19 21:14:02 +00:00
|
|
|
# secret read access to run analysis templates which reference secrets
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ""
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- secrets
|
2024-03-26 08:35:50 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
2021-07-07 15:17:35 +00:00
|
|
|
- configmaps
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2024-03-26 08:35:50 +00:00
|
|
|
{{- if .Values.providerRBAC.providers.gatewayAPI }}
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
{{- end }}
|
2021-01-21 17:48:29 +00:00
|
|
|
# pod list/update needed for updating ephemeral data
|
2020-10-05 17:14:50 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ""
|
2020-10-05 17:14:50 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- pods
|
2020-10-05 17:14:50 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- list
|
2020-10-05 17:14:50 +00:00
|
|
|
- update
|
2023-01-19 21:14:02 +00:00
|
|
|
- watch
|
2021-01-21 17:48:29 +00:00
|
|
|
# pods eviction needed for restart
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ""
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- pods/eviction
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- create
|
|
|
|
# event write needed for emitting events
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ""
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- events
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- update
|
|
|
|
- patch
|
2021-01-21 17:48:29 +00:00
|
|
|
# ingress patch needed for managing ingress annotations, create needed for nginx canary
|
2020-03-25 16:29:44 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- networking.k8s.io
|
2020-03-25 16:29:44 +00:00
|
|
|
- extensions
|
|
|
|
resources:
|
|
|
|
- ingresses
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2023-08-05 10:26:24 +00:00
|
|
|
- update
|
2020-03-25 16:29:44 +00:00
|
|
|
- patch
|
2021-01-21 17:48:29 +00:00
|
|
|
# job access needed for analysis template job metrics
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- batch
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- jobs
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- create
|
2021-01-21 17:48:29 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
2020-02-12 18:57:25 +00:00
|
|
|
- update
|
|
|
|
- patch
|
2021-01-21 17:48:29 +00:00
|
|
|
- delete
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- if .Values.providerRBAC.enabled }}
|
|
|
|
{{- if .Values.providerRBAC.providers.istio }}
|
2021-11-15 07:02:03 +00:00
|
|
|
# virtualservice/destinationrule access needed for using the Istio provider
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
|
|
|
- networking.istio.io
|
|
|
|
resources:
|
|
|
|
- virtualservices
|
2021-05-07 17:29:36 +00:00
|
|
|
- destinationrules
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- update
|
2021-05-31 16:06:26 +00:00
|
|
|
- patch
|
2020-10-05 17:14:50 +00:00
|
|
|
- list
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.smi }}
|
2021-01-21 17:48:29 +00:00
|
|
|
# trafficsplit access needed for using the SMI provider
|
2020-08-13 00:14:17 +00:00
|
|
|
- apiGroups:
|
2020-10-05 17:14:50 +00:00
|
|
|
- split.smi-spec.io
|
2020-08-13 00:14:17 +00:00
|
|
|
resources:
|
2020-10-05 17:14:50 +00:00
|
|
|
- trafficsplits
|
2020-08-13 00:14:17 +00:00
|
|
|
verbs:
|
2020-10-05 17:14:50 +00:00
|
|
|
- create
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- update
|
|
|
|
- patch
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.ambassador }}
|
2021-11-15 07:02:03 +00:00
|
|
|
# ambassador access needed for Ambassador provider
|
2021-05-31 16:06:26 +00:00
|
|
|
- apiGroups:
|
|
|
|
- getambassador.io
|
2021-11-15 07:02:03 +00:00
|
|
|
- x.getambassador.io
|
2021-05-31 16:06:26 +00:00
|
|
|
resources:
|
|
|
|
- mappings
|
2021-11-15 07:02:03 +00:00
|
|
|
- ambassadormappings
|
2021-05-31 16:06:26 +00:00
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- update
|
|
|
|
- list
|
|
|
|
- delete
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.awsLoadBalancerController }}
|
|
|
|
# Endpoints and TargetGroupBindings needed for ALB target group verification when using AWS Load Balancer Controller
|
2021-11-15 07:02:03 +00:00
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- endpoints
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- apiGroups:
|
|
|
|
- elbv2.k8s.aws
|
|
|
|
resources:
|
|
|
|
- targetgroupbindings
|
|
|
|
verbs:
|
|
|
|
- list
|
|
|
|
- get
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.awsAppMesh }}
|
2022-03-23 21:11:46 +00:00
|
|
|
# AppMesh virtualservices/virtualrouter CRD read-only access needed for using the App Mesh provider
|
|
|
|
- apiGroups:
|
|
|
|
- appmesh.k8s.aws
|
|
|
|
resources:
|
|
|
|
- virtualservices
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
# AppMesh virtualnode CRD r/w access needed for using the App Mesh provider
|
|
|
|
- apiGroups:
|
|
|
|
- appmesh.k8s.aws
|
|
|
|
resources:
|
|
|
|
- virtualnodes
|
|
|
|
- virtualrouters
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- update
|
|
|
|
- patch
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.traefik }}
|
|
|
|
# Traefik access needed when using the Traefik provider
|
2023-01-19 21:14:02 +00:00
|
|
|
- apiGroups:
|
|
|
|
- traefik.containo.us
|
2024-07-01 10:02:14 +00:00
|
|
|
- traefik.io
|
2023-01-19 21:14:02 +00:00
|
|
|
resources:
|
|
|
|
- traefikservices
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- update
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.apisix }}
|
|
|
|
# Access needed when using the Apisix provider
|
2023-01-19 21:14:02 +00:00
|
|
|
- apiGroups:
|
|
|
|
- apisix.apache.org
|
|
|
|
resources:
|
|
|
|
- apisixroutes
|
|
|
|
verbs:
|
|
|
|
- watch
|
|
|
|
- get
|
|
|
|
- update
|
2020-02-12 18:57:25 +00:00
|
|
|
{{- end }}
|
2023-12-07 17:49:59 +00:00
|
|
|
{{- if .Values.providerRBAC.providers.contour }}
|
|
|
|
# Access needed when using the Contour provider
|
|
|
|
- apiGroups:
|
2024-03-22 16:09:43 +00:00
|
|
|
- projectcontour.io
|
2023-12-07 17:49:59 +00:00
|
|
|
resources:
|
2024-03-22 16:09:43 +00:00
|
|
|
- httpproxies
|
2023-12-07 17:49:59 +00:00
|
|
|
verbs:
|
2024-03-22 16:09:43 +00:00
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
2023-12-07 17:49:59 +00:00
|
|
|
{{- end }}
|
2024-01-07 04:30:45 +00:00
|
|
|
{{- if .Values.providerRBAC.providers.glooPlatform }}
|
|
|
|
# Access needed when using the Gloo Platform provider
|
|
|
|
- apiGroups:
|
2024-03-22 16:09:43 +00:00
|
|
|
- networking.gloo.solo.io
|
2024-01-07 04:30:45 +00:00
|
|
|
resources:
|
2024-03-22 16:09:43 +00:00
|
|
|
- routetables
|
2024-01-07 04:30:45 +00:00
|
|
|
verbs:
|
2024-03-22 16:09:43 +00:00
|
|
|
- '*'
|
|
|
|
{{- end }}
|
2024-03-26 08:35:50 +00:00
|
|
|
{{- if .Values.providerRBAC.providers.gatewayAPI }}
|
|
|
|
# Access needed when using the Gateway API provider
|
|
|
|
- apiGroups:
|
|
|
|
- gateway.networking.k8s.io
|
|
|
|
resources:
|
|
|
|
- httproutes
|
|
|
|
- tcproutes
|
|
|
|
- tlsroutes
|
|
|
|
- udproutes
|
|
|
|
- grpcroutes
|
|
|
|
verbs:
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
{{- end }}
|
2024-03-22 16:09:43 +00:00
|
|
|
{{- with .Values.providerRBAC.additionalRules }}
|
|
|
|
{{ toYaml . }}
|
2024-01-07 04:30:45 +00:00
|
|
|
{{- end }}
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|