command
module
Version:
v0.0.0-...-0ba555b
Opens a new window with list of versions in this module.
Published: Nov 2, 2020
License: MIT
Opens a new window with license information.
Imports: 11
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
enforce-ingress-class
自动强制为 Ingress 指定一个 IngressClass
使用方式
# create serviceaccount
apiVersion: v1
kind: ServiceAccount
metadata:
name: enforce-ingress-class
namespace: autoops
---
# create clusterrole
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: enforce-ingress-class
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
---
# create clusterrolebinding
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: enforce-ingress-class
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: enforce-ingress-class
subjects:
- kind: ServiceAccount
name: enforce-ingress-class
namespace: autoops
---
# create job
apiVersion: batch/v1
kind: Job
metadata:
name: install-enforce-ingress-class
namespace: autoops
spec:
template:
spec:
serviceAccount: admission-bootstrapper
containers:
- name: admission-bootstrapper
image: autoops/admission-bootstrapper
env:
- name: ADMISSION_NAME
value: enforce-ingress-class
- name: ADMISSION_IMAGE
value: autoops/enforce-ingress-class
- name: ADMISSION_ENVS
value: ""
- name: ADMISSION_SERVICE_ACCOUNT
value: "enforce-ingress-class"
- name: ADMISSION_MUTATING
value: "true"
- name: ADMISSION_IGNORE_FAILURE
value: "false"
- name: ADMISSION_SIDE_EFFECT
value: "None"
- name: ADMISSION_RULES
value: '[{"operations":["CREATE"],"apiGroups":["extensions", "networking.k8s.io"], "apiVersions":["*"], "resources":["ingresses"]}]'
restartPolicy: OnFailure
Credits
Guo Y.K., MIT License
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.