2016-10-10 22:09:50 +08:00
|
|
|
apiVersion: extensions/v1beta1
|
|
|
|
kind: ReplicaSet
|
|
|
|
metadata:
|
|
|
|
name: calico-policy-controller
|
2016-12-13 18:43:06 +08:00
|
|
|
namespace: {{ system_namespace }}
|
2016-10-10 22:09:50 +08:00
|
|
|
labels:
|
|
|
|
k8s-app: calico-policy
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
spec:
|
|
|
|
replicas: 1
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
k8s-app: calico-policy
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
name: calico-policy-controller
|
2017-09-04 16:29:40 +08:00
|
|
|
namespace: {{ system_namespace }}
|
2016-10-10 22:09:50 +08:00
|
|
|
labels:
|
|
|
|
kubernetes.io/cluster-service: "true"
|
|
|
|
k8s-app: calico-policy
|
|
|
|
spec:
|
|
|
|
hostNetwork: true
|
2017-09-04 16:29:40 +08:00
|
|
|
{% if rbac_enabled %}
|
|
|
|
serviceAccountName: calico-policy-controller
|
|
|
|
{% endif %}
|
2017-08-24 17:04:25 +08:00
|
|
|
tolerations:
|
2017-09-04 16:29:40 +08:00
|
|
|
- effect: NoSchedule
|
|
|
|
operator: Exists
|
2016-10-10 22:09:50 +08:00
|
|
|
containers:
|
|
|
|
- name: calico-policy-controller
|
2016-11-21 18:20:44 +08:00
|
|
|
image: {{ calico_policy_image_repo }}:{{ calico_policy_image_tag }}
|
2016-11-22 23:16:04 +08:00
|
|
|
imagePullPolicy: {{ k8s_image_pull_policy }}
|
2016-12-23 22:44:44 +08:00
|
|
|
resources:
|
|
|
|
limits:
|
|
|
|
cpu: {{ calico_policy_controller_cpu_limit }}
|
|
|
|
memory: {{ calico_policy_controller_memory_limit }}
|
|
|
|
requests:
|
|
|
|
cpu: {{ calico_policy_controller_cpu_requests }}
|
|
|
|
memory: {{ calico_policy_controller_memory_requests }}
|
2016-10-10 22:09:50 +08:00
|
|
|
env:
|
|
|
|
- name: ETCD_ENDPOINTS
|
2016-11-09 18:31:12 +08:00
|
|
|
value: "{{ etcd_access_endpoint }}"
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: ETCD_CA_CERT_FILE
|
2016-12-30 20:47:12 +08:00
|
|
|
value: "{{ calico_cert_dir }}/ca_cert.crt"
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: ETCD_CERT_FILE
|
2016-12-30 20:47:12 +08:00
|
|
|
value: "{{ calico_cert_dir }}/cert.crt"
|
2016-11-09 18:44:41 +08:00
|
|
|
- name: ETCD_KEY_FILE
|
2016-12-30 20:47:12 +08:00
|
|
|
value: "{{ calico_cert_dir }}/key.pem"
|
2016-10-10 22:09:50 +08:00
|
|
|
# Location of the Kubernetes API - this shouldn't need to be
|
|
|
|
# changed so long as it is used in conjunction with
|
|
|
|
# CONFIGURE_ETC_HOSTS="true".
|
|
|
|
- name: K8S_API
|
2017-03-13 23:04:31 +08:00
|
|
|
value: "https://kubernetes.default"
|
2016-10-10 22:09:50 +08:00
|
|
|
# Configure /etc/hosts within the container to resolve
|
|
|
|
# the kubernetes.default Service to the correct clusterIP
|
|
|
|
# using the environment provided by the kubelet.
|
|
|
|
# This removes the need for KubeDNS to resolve the Service.
|
|
|
|
- name: CONFIGURE_ETC_HOSTS
|
|
|
|
value: "true"
|
2016-11-10 20:13:03 +08:00
|
|
|
volumeMounts:
|
2016-12-30 20:47:12 +08:00
|
|
|
- mountPath: {{ calico_cert_dir }}
|
2016-11-10 20:13:03 +08:00
|
|
|
name: etcd-certs
|
|
|
|
readOnly: true
|
|
|
|
volumes:
|
|
|
|
- hostPath:
|
2016-12-30 20:47:12 +08:00
|
|
|
path: {{ calico_cert_dir }}
|
2016-11-10 20:13:03 +08:00
|
|
|
name: etcd-certs
|