command
module
Version:
v0.0.0-...-75f8839
Opens a new window with list of versions in this module.
Published: Nov 3, 2020
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
enforce-qcloud-fixed-ip
自动强制为 StatefulSet 类型开启腾讯云 TKE 固定 Pod IP 功能
提示
本功能依赖于腾讯云 TKE 的全局 VPC-CNI 模式(非 GlobalRouter + VPC-CNI 模式)
使用方式
# create serviceaccount
apiVersion: v1
kind: ServiceAccount
metadata:
name: enforce-qcloud-fixed-ip
namespace: autoops
---
# create clusterrole
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: enforce-qcloud-fixed-ip
rules:
- apiGroups: [""]
resources: ["namespaces"]
verbs: ["get"]
---
# create clusterrolebinding
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: enforce-qcloud-fixed-ip
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: enforce-qcloud-fixed-ip
subjects:
- kind: ServiceAccount
name: enforce-qcloud-fixed-ip
namespace: autoops
---
# create job
apiVersion: batch/v1
kind: Job
metadata:
name: install-enforce-qcloud-fixed-ip
namespace: autoops
spec:
template:
spec:
serviceAccount: admission-bootstrapper
containers:
- name: admission-bootstrapper
image: autoops/admission-bootstrapper
env:
- name: ADMISSION_NAME
value: enforce-qcloud-fixed-ip
- name: ADMISSION_IMAGE
value: autoops/enforce-qcloud-fixed-ip
- name: ADMISSION_ENVS
value: ""
- name: ADMISSION_SERVICE_ACCOUNT
value: "enforce-qcloud-fixed-ip"
- name: ADMISSION_MUTATING
value: "true"
- name: ADMISSION_IGNORE_FAILURE
value: "false"
- name: ADMISSION_SIDE_EFFECT
value: "None"
- name: ADMISSION_RULES
value: '[{"operations":["CREATE"],"apiGroups":["apps"], "apiVersions":["*"], "resources":["statefulsets"]}]'
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.