mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 09:22:44 +00:00
libvirt_coreos: to remove old skydns fork fetching from addons
This commit is contained in:
parent
31da82df52
commit
a1c323fa75
@ -58,3 +58,7 @@ ENABLE_CLUSTER_DNS="${KUBE_ENABLE_CLUSTER_DNS:-true}"
|
|||||||
DNS_SERVER_IP="${SERVICE_CLUSTER_IP_RANGE%.*}.254"
|
DNS_SERVER_IP="${SERVICE_CLUSTER_IP_RANGE%.*}.254"
|
||||||
DNS_DOMAIN="cluster.local"
|
DNS_DOMAIN="cluster.local"
|
||||||
DNS_REPLICAS=1
|
DNS_REPLICAS=1
|
||||||
|
|
||||||
|
#Generate dns files
|
||||||
|
sed -f "${KUBE_ROOT}/cluster/addons/dns/transforms2sed.sed" < "${KUBE_ROOT}/cluster/addons/dns/skydns-rc.yaml.base" | sed -f "${KUBE_ROOT}/cluster/libvirt-coreos/forShellEval.sed" > "${KUBE_ROOT}/cluster/libvirt-coreos/skydns-rc.yaml"
|
||||||
|
sed -f "${KUBE_ROOT}/cluster/addons/dns/transforms2sed.sed" < "${KUBE_ROOT}/cluster/addons/dns/skydns-svc.yaml.base" | sed -f "${KUBE_ROOT}/cluster/libvirt-coreos/forShellEval.sed" > "${KUBE_ROOT}/cluster/libvirt-coreos/skydns-svc.yaml"
|
||||||
|
4
cluster/libvirt-coreos/forShellEval.sed
Normal file
4
cluster/libvirt-coreos/forShellEval.sed
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
s/\"/\\"/g
|
||||||
|
s/DNS_SERVER_IP/{DNS_SERVER_IP}/g
|
||||||
|
s/DNS_REPLICAS/{DNS_REPLICAS}/g
|
||||||
|
s/DNS_DOMAIN/{DNS_DOMAIN}/g
|
@ -1,129 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: ReplicationController
|
|
||||||
metadata:
|
|
||||||
name: kube-dns-v11
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
version: v11
|
|
||||||
kubernetes.io/cluster-service: \"true\"
|
|
||||||
spec:
|
|
||||||
replicas: ${DNS_REPLICAS}
|
|
||||||
selector:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
version: v11
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
version: v11
|
|
||||||
kubernetes.io/cluster-service: \"true\"
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: etcd
|
|
||||||
image: gcr.io/google_containers/etcd-amd64:2.2.1
|
|
||||||
resources:
|
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
|
||||||
# clusters, then set request = limit to keep this container in
|
|
||||||
# guaranteed class. Currently, this container falls into the
|
|
||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 500Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 50Mi
|
|
||||||
command:
|
|
||||||
- /usr/local/bin/etcd
|
|
||||||
- -data-dir
|
|
||||||
- /var/etcd/data
|
|
||||||
- -listen-client-urls
|
|
||||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
|
||||||
- -advertise-client-urls
|
|
||||||
- http://127.0.0.1:2379,http://127.0.0.1:4001
|
|
||||||
- -initial-cluster-token
|
|
||||||
- skydns-etcd
|
|
||||||
volumeMounts:
|
|
||||||
- name: etcd-storage
|
|
||||||
mountPath: /var/etcd/data
|
|
||||||
- name: kube2sky
|
|
||||||
image: gcr.io/google_containers/kube2sky:1.14
|
|
||||||
resources:
|
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
|
||||||
# clusters, then set request = limit to keep this container in
|
|
||||||
# guaranteed class. Currently, this container falls into the
|
|
||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
# Kube2sky watches all pods.
|
|
||||||
memory: 200Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 50Mi
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /healthz
|
|
||||||
port: 8080
|
|
||||||
scheme: HTTP
|
|
||||||
initialDelaySeconds: 60
|
|
||||||
timeoutSeconds: 5
|
|
||||||
successThreshold: 1
|
|
||||||
failureThreshold: 5
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /readiness
|
|
||||||
port: 8081
|
|
||||||
scheme: HTTP
|
|
||||||
# we poll on pod startup for the Kubernetes master service and
|
|
||||||
# only setup the /readiness HTTP server once that's available.
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
timeoutSeconds: 5
|
|
||||||
args:
|
|
||||||
# command = "/kube2sky"
|
|
||||||
- --domain=${DNS_DOMAIN}
|
|
||||||
- name: skydns
|
|
||||||
image: gcr.io/google_containers/skydns:2015-10-13-8c72f8c
|
|
||||||
resources:
|
|
||||||
# TODO: Set memory limits when we've profiled the container for large
|
|
||||||
# clusters, then set request = limit to keep this container in
|
|
||||||
# guaranteed class. Currently, this container falls into the
|
|
||||||
# "burstable" category so the kubelet doesn't backoff from restarting it.
|
|
||||||
limits:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 200Mi
|
|
||||||
requests:
|
|
||||||
cpu: 100m
|
|
||||||
memory: 50Mi
|
|
||||||
args:
|
|
||||||
# command = "/skydns"
|
|
||||||
- -machines=http://127.0.0.1:4001
|
|
||||||
- -addr=0.0.0.0:53
|
|
||||||
- -ns-rotate=false
|
|
||||||
- -domain=${DNS_DOMAIN}.
|
|
||||||
ports:
|
|
||||||
- containerPort: 53
|
|
||||||
name: dns
|
|
||||||
protocol: UDP
|
|
||||||
- containerPort: 53
|
|
||||||
name: dns-tcp
|
|
||||||
protocol: TCP
|
|
||||||
- name: healthz
|
|
||||||
image: gcr.io/google_containers/exechealthz:1.0
|
|
||||||
resources:
|
|
||||||
# keep request = limit to keep this container in guaranteed class
|
|
||||||
limits:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 20Mi
|
|
||||||
requests:
|
|
||||||
cpu: 10m
|
|
||||||
memory: 20Mi
|
|
||||||
args:
|
|
||||||
- -cmd=nslookup kubernetes.default.svc.${DNS_DOMAIN} 127.0.0.1 >/dev/null
|
|
||||||
- -port=8080
|
|
||||||
ports:
|
|
||||||
- containerPort: 8080
|
|
||||||
protocol: TCP
|
|
||||||
volumes:
|
|
||||||
- name: etcd-storage
|
|
||||||
emptyDir: {}
|
|
||||||
dnsPolicy: Default # Don't use cluster DNS.
|
|
@ -1,20 +0,0 @@
|
|||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: kube-dns
|
|
||||||
namespace: kube-system
|
|
||||||
labels:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
kubernetes.io/cluster-service: \"true\"
|
|
||||||
kubernetes.io/name: \"KubeDNS\"
|
|
||||||
spec:
|
|
||||||
selector:
|
|
||||||
k8s-app: kube-dns
|
|
||||||
clusterIP: ${DNS_SERVER_IP}
|
|
||||||
ports:
|
|
||||||
- name: dns
|
|
||||||
port: 53
|
|
||||||
protocol: UDP
|
|
||||||
- name: dns-tcp
|
|
||||||
port: 53
|
|
||||||
protocol: TCP
|
|
Loading…
Reference in New Issue
Block a user