Discover Packages
github.com/tibordp/prefer-dual-stack-webhook
command
module
Version:
v0.0.0-...-048efe5
Opens a new window with list of versions in this module.
Published: Oct 10, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
PreferDualStack Admission Controller
Currently Kubernetes services are created in single stack mode by default , defaulting to primary address family of the cluster.
This is a mutating webhook admission controller that adds ipFamilyPolicy: PreferDualStack
to all newly created services if the field is not explicitely specified, making dual-stack the default.
Installation
kubectl apply -f https://raw.githubusercontent.com/tibordp/prefer-dual-stack-webhook/master/deploy.yaml
Demo
Before
Afrer
> kubectl apply -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: dummy
spec:
selector:
app: dummy
ports:
- port: 80
targetPort: 80
EOF
service/dummy created
> kubectl describe svc dummy
Name: dummy
Namespace: default
Labels: <none>
Annotations: <none>
Selector: app=dummy
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.96.200.4
IPs: 10.96.200.4
Port: <unset> 80/TCP
TargetPort: 80/TCP
Endpoints: <none>
Session Affinity: None
Events: <none>
> kubectl apply -f - <<EOF
apiVersion: v1
kind: Service
metadata:
name: dummy
spec:
selector:
app: dummy
ports:
- port: 80
targetPort: 80
EOF
service/dummy created
> kubectl describe svc dummy
Name: dummy
Namespace: default
Labels: <none>
Annotations: <none>
Selector: app=dummy
Type: ClusterIP
IP Family Policy: PreferDualStack
IP Families: IPv4,IPv6
IP: 10.96.19.47
IPs: 10.96.19.47,fd00:10:96::f31
Port: <unset> 80/TCP
TargetPort: 80/TCP
Endpoints: <none>
Session Affinity: None
Events: <none>
Acknowledgements
Admission controller webhook boilerplate adapted from douglasmakey/admissioncontroller by Douglas Makey Mendez Molero.
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.