2021-05-31 16:06:26 +00:00
|
|
|
{{- if not .Values.clusterInstall }}
|
2020-02-12 18:57:25 +00:00
|
|
|
apiVersion: rbac.authorization.k8s.io/v1
|
|
|
|
kind: Role
|
|
|
|
metadata:
|
2021-05-31 16:06:26 +00:00
|
|
|
name: {{ include "argo-rollouts.fullname" . }}
|
2023-04-13 18:16:20 +00:00
|
|
|
namespace: {{ .Release.Namespace | quote }}
|
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-10-05 17:14:50 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- argoproj.io
|
2020-10-05 17:14:50 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- analysistemplates
|
|
|
|
- clusteranalysistemplates
|
2020-10-05 17:14:50 +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
|
2023-01-19 21:14:02 +00:00
|
|
|
# deployments and podtemplates read access needed for workload reference support
|
|
|
|
- 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
|
2023-01-19 21:14:02 +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
|
2023-01-19 21:14:02 +00:00
|
|
|
- create
|
|
|
|
- delete
|
|
|
|
# leases create/get/update needed for leader election
|
|
|
|
- apiGroups:
|
|
|
|
- coordination.k8s.io
|
|
|
|
resources:
|
|
|
|
- leases
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- update
|
|
|
|
# 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
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- pods
|
|
|
|
verbs:
|
|
|
|
- list
|
2020-02-12 18:57:25 +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-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/eviction
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
# event write needed for emitting events
|
|
|
|
- apiGroups:
|
|
|
|
- ""
|
|
|
|
resources:
|
|
|
|
- events
|
2020-10-05 17:14:50 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- create
|
2020-10-05 17:14:50 +00:00
|
|
|
- update
|
2021-01-21 17:48:29 +00:00
|
|
|
- patch
|
|
|
|
# ingress patch needed for managing ingress annotations, create needed for nginx canary
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- networking.k8s.io
|
|
|
|
- extensions
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- ingresses
|
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
|
2023-08-05 10:26:24 +00:00
|
|
|
- update
|
2021-01-21 17:48:29 +00:00
|
|
|
- patch
|
|
|
|
# job access needed for analysis template job metrics
|
2020-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
|
|
|
- batch
|
|
|
|
resources:
|
|
|
|
- jobs
|
|
|
|
verbs:
|
|
|
|
- create
|
|
|
|
- get
|
|
|
|
- list
|
|
|
|
- watch
|
|
|
|
- update
|
|
|
|
- patch
|
|
|
|
- delete
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- if .Values.providerRBAC.enabled }}
|
|
|
|
{{- if .Values.providerRBAC.providers.istio }}
|
2023-01-19 21:14:02 +00:00
|
|
|
# virtualservice/destinationrule access needed for using the Istio provider
|
2020-04-20 23:40:39 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- networking.istio.io
|
2020-04-20 23:40:39 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- virtualservices
|
2023-01-19 21:14:02 +00:00
|
|
|
- destinationrules
|
2020-04-20 23:40:39 +00:00
|
|
|
verbs:
|
2021-01-21 17:48:29 +00:00
|
|
|
- watch
|
2020-04-20 23:40:39 +00:00
|
|
|
- get
|
2021-01-21 17:48:29 +00:00
|
|
|
- update
|
2023-01-19 21:14:02 +00:00
|
|
|
- patch
|
2020-04-20 23:40:39 +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-02-12 18:57:25 +00:00
|
|
|
- apiGroups:
|
2021-01-21 17:48:29 +00:00
|
|
|
- split.smi-spec.io
|
2020-02-12 18:57:25 +00:00
|
|
|
resources:
|
2021-01-21 17:48:29 +00:00
|
|
|
- trafficsplits
|
2020-02-12 18:57:25 +00:00
|
|
|
verbs:
|
|
|
|
- create
|
2021-01-21 17:48:29 +00:00
|
|
|
- watch
|
|
|
|
- get
|
2020-02-12 18:57:25 +00:00
|
|
|
- update
|
|
|
|
- patch
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- if .Values.providerRBAC.providers.ambassador }}
|
2023-01-19 21:14:02 +00:00
|
|
|
# ambassador access needed for Ambassador provider
|
|
|
|
- apiGroups:
|
|
|
|
- getambassador.io
|
|
|
|
- x.getambassador.io
|
|
|
|
resources:
|
|
|
|
- mappings
|
|
|
|
- ambassadormappings
|
|
|
|
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
|
2023-01-19 21:14:02 +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 }}
|
2023-01-19 21:14:02 +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
|
|
|
|
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
|
2021-05-31 16:06:26 +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-26 08:35:50 +00:00
|
|
|
- networking.gloo.solo.io
|
2024-01-07 04:30:45 +00:00
|
|
|
resources:
|
2024-03-26 08:35:50 +00:00
|
|
|
- routetables
|
2024-01-07 04:30:45 +00:00
|
|
|
verbs:
|
2024-03-26 08:35:50 +00:00
|
|
|
- '*'
|
|
|
|
{{- end }}
|
|
|
|
{{- 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
|
2024-01-07 04:30:45 +00:00
|
|
|
{{- end }}
|
2023-01-20 16:41:52 +00:00
|
|
|
{{- end }}
|
|
|
|
{{- end }}
|