update kubeflow dip-catalog
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: cluster-role-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: cluster-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: service-account
|
||||
@@ -0,0 +1,65 @@
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: cluster-role
|
||||
rules:
|
||||
- apiGroups:
|
||||
- kubeflow.org
|
||||
resources:
|
||||
- poddefaults
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- list
|
||||
- update
|
||||
- create
|
||||
- patch
|
||||
- delete
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-poddefaults-admin
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-admin: "true"
|
||||
aggregationRule:
|
||||
clusterRoleSelectors:
|
||||
- matchLabels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-poddefaults-admin: "true"
|
||||
rules: []
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-poddefaults-edit
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-edit: "true"
|
||||
aggregationRule:
|
||||
clusterRoleSelectors:
|
||||
- matchLabels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-poddefaults-edit: "true"
|
||||
rules: []
|
||||
|
||||
---
|
||||
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kubeflow-poddefaults-view
|
||||
labels:
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-poddefaults-admin: "true"
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-poddefaults-edit: "true"
|
||||
rbac.authorization.kubeflow.org/aggregate-to-kubeflow-view: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- kubeflow.org
|
||||
resources:
|
||||
- poddefaults
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,25 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment
|
||||
spec:
|
||||
template:
|
||||
metadata:
|
||||
annotations:
|
||||
sidecar.istio.io/inject: "false"
|
||||
spec:
|
||||
containers:
|
||||
- image: docker.io/kubeflownotebookswg/poddefaults-webhook
|
||||
name: admission-webhook
|
||||
volumeMounts:
|
||||
- mountPath: /etc/webhook/certs
|
||||
name: webhook-cert
|
||||
readOnly: true
|
||||
ports:
|
||||
- name: https-webhook
|
||||
containerPort: 4443
|
||||
volumes:
|
||||
- name: webhook-cert
|
||||
secret:
|
||||
secretName: webhook-certs
|
||||
serviceAccountName: service-account
|
||||
@@ -0,0 +1,52 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- cluster-role-binding.yaml
|
||||
- cluster-role.yaml
|
||||
- deployment.yaml
|
||||
- mutating-webhook-configuration.yaml
|
||||
- service-account.yaml
|
||||
- service.yaml
|
||||
- crd.yaml
|
||||
commonLabels:
|
||||
app: poddefaults
|
||||
kustomize.component: poddefaults
|
||||
app.kubernetes.io/component: poddefaults
|
||||
app.kubernetes.io/name: poddefaults
|
||||
images:
|
||||
- name: docker.io/kubeflownotebookswg/poddefaults-webhook
|
||||
newName: docker.io/kubeflownotebookswg/poddefaults-webhook
|
||||
newTag: v1.9.0
|
||||
namespace: kubeflow
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
vars:
|
||||
# These vars are used to substitute in the namespace, service name and
|
||||
# deployment name into the mutating WebHookConfiguration.
|
||||
# Since its a CR kustomize isn't aware of those fields and won't
|
||||
# transform them.
|
||||
# We need the var names to be relatively unique so that when we
|
||||
# compose with other applications they won't conflict.
|
||||
- fieldref:
|
||||
fieldPath: metadata.namespace
|
||||
name: podDefaultsNamespace
|
||||
objref:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
name: service
|
||||
- fieldref:
|
||||
fieldPath: metadata.name
|
||||
name: podDefaultsServiceName
|
||||
objref:
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
name: service
|
||||
- fieldref:
|
||||
fieldPath: metadata.name
|
||||
name: podDefaultsDeploymentName
|
||||
objref:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: deployment
|
||||
configurations:
|
||||
- params.yaml
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: mutating-webhook-configuration
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1beta1
|
||||
- v1
|
||||
clientConfig:
|
||||
caBundle: ""
|
||||
service:
|
||||
name: service
|
||||
path: /apply-poddefault
|
||||
sideEffects: None
|
||||
failurePolicy: Fail
|
||||
name: $(podDefaultsDeploymentName).kubeflow.org
|
||||
namespaceSelector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/part-of: kubeflow-profile
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
apiVersions:
|
||||
- v1
|
||||
operations:
|
||||
- CREATE
|
||||
resources:
|
||||
- pods
|
||||
@@ -0,0 +1,19 @@
|
||||
varReference:
|
||||
- path: webhooks/clientConfig/service/namespace
|
||||
kind: MutatingWebhookConfiguration
|
||||
- path: webhooks/clientConfig/service/name
|
||||
kind: MutatingWebhookConfiguration
|
||||
- path: webhooks/name
|
||||
kind: MutatingWebhookConfiguration
|
||||
nameReference:
|
||||
- kind: Service
|
||||
version: v1
|
||||
fieldSpecs:
|
||||
- kind: MutatingWebhookConfiguration
|
||||
group: admissionregistration.k8s.io
|
||||
path: webhooks/clientConfig/service/name
|
||||
namespace:
|
||||
- kind: MutatingWebhookConfiguration
|
||||
group: admissionregistration.k8s.io
|
||||
path: webhooks/clientConfig/service/namespace
|
||||
create: true
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: service-account
|
||||
@@ -0,0 +1,9 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: service
|
||||
spec:
|
||||
ports:
|
||||
- name: https-webhook
|
||||
port: 443
|
||||
targetPort: https-webhook
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: cert
|
||||
spec:
|
||||
isCA: true
|
||||
commonName: $(podDefaultsServiceName).$(podDefaultsNamespace).svc
|
||||
dnsNames:
|
||||
- $(podDefaultsServiceName).$(podDefaultsNamespace).svc
|
||||
- $(podDefaultsServiceName).$(podDefaultsNamespace).svc.cluster.local
|
||||
issuerRef:
|
||||
kind: Issuer
|
||||
name: selfsigned-issuer
|
||||
secretName: webhook-certs
|
||||
|
||||
---
|
||||
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Issuer
|
||||
metadata:
|
||||
name: selfsigned-issuer
|
||||
spec:
|
||||
selfSigned: {}
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: deployment
|
||||
spec:
|
||||
template:
|
||||
spec:
|
||||
containers:
|
||||
- name: admission-webhook
|
||||
args:
|
||||
- --tlsCertFile=/etc/webhook/certs/tls.crt
|
||||
- --tlsKeyFile=/etc/webhook/certs/tls.key
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
# This overlay uses CertManager to provision a certificate for the
|
||||
# PodDefaults admission controller. This is preferred over the old
|
||||
# way of using "bootstrap" which was running a shell script to create
|
||||
# the certificate.
|
||||
# TODO(jlewi): We should eventually refactor the manifests to delete
|
||||
# bootstrap and use certmanager by default.
|
||||
bases:
|
||||
- ../../base
|
||||
|
||||
resources:
|
||||
- certificate.yaml
|
||||
|
||||
namespace: kubeflow
|
||||
|
||||
namePrefix: admission-webhook-
|
||||
|
||||
commonLabels:
|
||||
app: poddefaults
|
||||
kustomize.component: poddefaults
|
||||
app.kubernetes.io/component: poddefaults
|
||||
app.kubernetes.io/name: poddefaults
|
||||
|
||||
patchesStrategicMerge:
|
||||
- mutating-webhook-configuration.yaml
|
||||
- deployment.yaml
|
||||
|
||||
generatorOptions:
|
||||
disableNameSuffixHash: true
|
||||
|
||||
vars:
|
||||
# These vars are used to substitute in the namespace, service name and
|
||||
# deployment name into the mutating WebHookConfiguration.
|
||||
# Since its a CR kustomize isn't aware of those fields and won't
|
||||
# transform them.
|
||||
# We need the var names to be relatively unique so that when we
|
||||
# compose with other applications they won't conflict.
|
||||
- name: podDefaultsCertName
|
||||
objref:
|
||||
kind: Certificate
|
||||
group: cert-manager.io
|
||||
version: v1
|
||||
name: cert
|
||||
fieldref:
|
||||
fieldpath: metadata.name
|
||||
|
||||
configurations:
|
||||
- params.yaml
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: mutating-webhook-configuration
|
||||
annotations:
|
||||
cert-manager.io/inject-ca-from: $(podDefaultsNamespace)/$(podDefaultsCertName)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
varReference:
|
||||
- path: spec/commonName
|
||||
kind: Certificate
|
||||
- path: spec/dnsNames
|
||||
kind: Certificate
|
||||
- path: spec/issuerRef/name
|
||||
kind: Certificate
|
||||
- path: metadata/annotations
|
||||
kind: MutatingWebhookConfiguration
|
||||
nameReference:
|
||||
- kind: Issuer
|
||||
group: cert-manager.io
|
||||
fieldSpecs:
|
||||
- kind: Certificate
|
||||
group: cert-manager.io
|
||||
path: spec/issuerRef/name
|
||||
Reference in New Issue
Block a user