mirror of
https://github.com/storytold/irsa-manager.git
synced 2026-10-17 00:23:52 +00:00
webhook manifests
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- update
|
||||
- patch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- serviceaccounts
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- apiGroups:
|
||||
- certificates.k8s.io
|
||||
resources:
|
||||
- certificatesigningrequests
|
||||
verbs:
|
||||
- create
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: pod-identity-webhook
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
@@ -0,0 +1,36 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: pod-identity-webhook
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: pod-identity-webhook
|
||||
spec:
|
||||
serviceAccountName: pod-identity-webhook
|
||||
containers:
|
||||
- name: pod-identity-webhook
|
||||
image: quay.io/amis/pod-identity-webhook:v0.0.1
|
||||
imagePullPolicy: Always
|
||||
# command:
|
||||
# - /webhook
|
||||
# - --in-cluster
|
||||
# - --namespace=kube-system
|
||||
# - --service-name=pod-identity-webhook
|
||||
# - --tls-secret=pod-identity-webhook
|
||||
# - --annotation-prefix=eks.amazonaws.com
|
||||
# - --token-audience=sts.amazonaws.com
|
||||
# - --logtostderr
|
||||
volumeMounts:
|
||||
- name: webhook-certs
|
||||
mountPath: /var/run/app/certs
|
||||
readOnly: false
|
||||
volumes:
|
||||
- name: webhook-certs
|
||||
emptyDir: {}
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: admissionregistration.k8s.io/v1beta1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
webhooks:
|
||||
- name: pod-identity-webhook.amazonaws.com
|
||||
failurePolicy: Ignore
|
||||
clientConfig:
|
||||
service:
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
path: "/mutate"
|
||||
rules:
|
||||
- operations: ["CREATE"]
|
||||
apiGroups: [""]
|
||||
apiVersions: ["v1"]
|
||||
resources: ["pods"]
|
||||
@@ -0,0 +1,15 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
annotations:
|
||||
prometheus.io/port: "443"
|
||||
prometheus.io/scheme: "https"
|
||||
prometheus.io/scrape: "true"
|
||||
spec:
|
||||
ports:
|
||||
- port: 443
|
||||
targetPort: 443
|
||||
selector:
|
||||
app: pod-identity-webhook
|
||||
@@ -0,0 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: pod-identity-webhook
|
||||
namespace: kube-system
|
||||
Reference in New Issue
Block a user