add validating admission controller for argo events
This commit is contained in:
@@ -10,4 +10,17 @@ roleRef:
|
|||||||
subjects:
|
subjects:
|
||||||
- kind: ServiceAccount
|
- kind: ServiceAccount
|
||||||
name: argo-events-sa
|
name: argo-events-sa
|
||||||
|
namespace: argo-events
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: argo-events-webhook-binding
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: argo-events-webhook
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: argo-events-webhook-sa
|
||||||
namespace: argo-events
|
namespace: argo-events
|
||||||
@@ -165,4 +165,66 @@ rules:
|
|||||||
- watch
|
- watch
|
||||||
- update
|
- update
|
||||||
- patch
|
- patch
|
||||||
- delete
|
- delete
|
||||||
|
---
|
||||||
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
|
kind: ClusterRole
|
||||||
|
metadata:
|
||||||
|
name: argo-events-webhook
|
||||||
|
rules:
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- secrets
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- delete
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- ""
|
||||||
|
resources:
|
||||||
|
- configmaps
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- apps
|
||||||
|
resources:
|
||||||
|
- deployments
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- apiGroups:
|
||||||
|
- admissionregistration.k8s.io
|
||||||
|
resources:
|
||||||
|
- validatingwebhookconfigurations
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- create
|
||||||
|
- update
|
||||||
|
- delete
|
||||||
|
- patch
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- argoproj.io
|
||||||
|
resources:
|
||||||
|
- eventbus
|
||||||
|
- eventsources
|
||||||
|
- sensors
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
|
- watch
|
||||||
|
- apiGroups:
|
||||||
|
- rbac.authorization.k8s.io
|
||||||
|
resources:
|
||||||
|
- clusterroles
|
||||||
|
verbs:
|
||||||
|
- get
|
||||||
|
- list
|
||||||
@@ -49,4 +49,34 @@ spec:
|
|||||||
volumes:
|
volumes:
|
||||||
- configMap:
|
- configMap:
|
||||||
name: argo-events-controller-config
|
name: argo-events-controller-config
|
||||||
name: controller-config-volume
|
name: controller-config-volume
|
||||||
|
---
|
||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: events-webhook
|
||||||
|
namespace: argo-events
|
||||||
|
spec:
|
||||||
|
replicas: 1
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: events-webhook
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
app: events-webhook
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- args:
|
||||||
|
- webhook-service
|
||||||
|
env:
|
||||||
|
- name: NAMESPACE
|
||||||
|
valueFrom:
|
||||||
|
fieldRef:
|
||||||
|
fieldPath: metadata.namespace
|
||||||
|
- name: PORT
|
||||||
|
value: "443"
|
||||||
|
image: quay.io/argoproj/argo-events:v1.9.2
|
||||||
|
imagePullPolicy: Always
|
||||||
|
name: webhook
|
||||||
|
serviceAccountName: argo-events-webhook-sa
|
||||||
|
|||||||
@@ -6,4 +6,5 @@ resources:
|
|||||||
- ./cluster-role.yaml
|
- ./cluster-role.yaml
|
||||||
- ./cluster-role-binding.yaml
|
- ./cluster-role-binding.yaml
|
||||||
- ./configmap.yaml
|
- ./configmap.yaml
|
||||||
- ./deployment.yaml
|
- ./deployment.yaml
|
||||||
|
- ./service.yaml
|
||||||
@@ -3,4 +3,10 @@ apiVersion: v1
|
|||||||
kind: ServiceAccount
|
kind: ServiceAccount
|
||||||
metadata:
|
metadata:
|
||||||
name: argo-events-sa
|
name: argo-events-sa
|
||||||
|
namespace: argo-events
|
||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: argo-events-webhook-sa
|
||||||
namespace: argo-events
|
namespace: argo-events
|
||||||
12
infrastructures/argo-events/base/service.yaml
Normal file
12
infrastructures/argo-events/base/service.yaml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: events-webhook
|
||||||
|
namespace: argo-events
|
||||||
|
spec:
|
||||||
|
ports:
|
||||||
|
- port: 443
|
||||||
|
targetPort: 443
|
||||||
|
selector:
|
||||||
|
app: events-webhook
|
||||||
Reference in New Issue
Block a user