update
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: haproxy
|
||||
namespace: kube-system
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
k8s-app: kube-haproxy
|
||||
annotations:
|
||||
haproxy-cfg-checksum: "{{ haproxy_stat.stat.checksum }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-node-critical
|
||||
containers:
|
||||
- name: haproxy
|
||||
image: {{ haproxy_image_repo }}:{{ haproxy_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ loadbalancer_apiserver_cpu_requests }}
|
||||
memory: {{ loadbalancer_apiserver_memory_requests }}
|
||||
{% if loadbalancer_apiserver_healthcheck_port is defined -%}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
||||
{% endif -%}
|
||||
volumeMounts:
|
||||
- mountPath: /usr/local/etc/haproxy/
|
||||
name: etc-haproxy
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: etc-haproxy
|
||||
hostPath:
|
||||
path: {{ haproxy_config_dir }}
|
||||
@@ -0,0 +1,93 @@
|
||||
# Inspired by https://github.com/kube-vip/kube-vip/blob/v0.5.5/pkg/kubevip/config_generator.go#L13
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
creationTimestamp: null
|
||||
name: kube-vip
|
||||
namespace: kube-system
|
||||
spec:
|
||||
containers:
|
||||
- args:
|
||||
- manager
|
||||
env:
|
||||
- name: vip_arp
|
||||
value: {{ kube_vip_arp_enabled | string | to_json }}
|
||||
- name: port
|
||||
value: {{ kube_apiserver_port | string | to_json }}
|
||||
{% if kube_vip_interface %}
|
||||
- name: vip_interface
|
||||
value: {{ kube_vip_interface | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_services_interface %}
|
||||
- name: vip_servicesinterface
|
||||
value: {{ kube_vip_services_interface | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_cidr %}
|
||||
- name: vip_cidr
|
||||
value: {{ kube_vip_cidr | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_controlplane_enabled %}
|
||||
- name: cp_enable
|
||||
value: "true"
|
||||
- name: cp_namespace
|
||||
value: kube-system
|
||||
- name: vip_ddns
|
||||
value: {{ kube_vip_ddns_enabled | string | to_json }}
|
||||
{% endif %}
|
||||
{% if kube_vip_services_enabled %}
|
||||
- name: svc_enable
|
||||
value: "true"
|
||||
{% endif %}
|
||||
{% if kube_vip_leader_election_enabled %}
|
||||
- name: vip_leaderelection
|
||||
value: "true"
|
||||
- name: vip_leaseduration
|
||||
value: "5"
|
||||
- name: vip_renewdeadline
|
||||
value: "3"
|
||||
- name: vip_retryperiod
|
||||
value: "1"
|
||||
{% endif %}
|
||||
{% if kube_vip_bgp_enabled %}
|
||||
- name: bgp_enable
|
||||
value: "true"
|
||||
- name: bgp_routerid
|
||||
value: {{ kube_vip_bgp_routerid | string | to_json }}
|
||||
- name: bgp_as
|
||||
value: {{ kube_vip_local_as | string | to_json }}
|
||||
- name: bgp_peeraddress
|
||||
value: {{ kube_vip_bgp_peeraddress | to_json }}
|
||||
- name: bgp_peerpass
|
||||
value: {{ kube_vip_bgp_peerpass | to_json }}
|
||||
- name: bgp_peeras
|
||||
value: {{ kube_vip_bgp_peeras | string | to_json }}
|
||||
{% if kube_vip_bgppeers %}
|
||||
- name: bgp_peers
|
||||
value: {{ kube_vip_bgppeers | join(',') | to_json }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
- name: address
|
||||
value: {{ kube_vip_address | to_json }}
|
||||
image: {{ kube_vip_image_repo }}:{{ kube_vip_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
name: kube-vip
|
||||
resources: {}
|
||||
securityContext:
|
||||
capabilities:
|
||||
add:
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
volumeMounts:
|
||||
- mountPath: /etc/kubernetes/admin.conf
|
||||
name: kubeconfig
|
||||
hostAliases:
|
||||
- hostnames:
|
||||
- kubernetes
|
||||
ip: 127.0.0.1
|
||||
hostNetwork: true
|
||||
volumes:
|
||||
- hostPath:
|
||||
path: /etc/kubernetes/admin.conf
|
||||
name: kubeconfig
|
||||
status: {}
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: nginx-proxy
|
||||
namespace: kube-system
|
||||
labels:
|
||||
addonmanager.kubernetes.io/mode: Reconcile
|
||||
k8s-app: kube-nginx
|
||||
annotations:
|
||||
nginx-cfg-checksum: "{{ nginx_stat.stat.checksum }}"
|
||||
spec:
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
nodeSelector:
|
||||
kubernetes.io/os: linux
|
||||
priorityClassName: system-node-critical
|
||||
containers:
|
||||
- name: nginx-proxy
|
||||
image: {{ nginx_image_repo }}:{{ nginx_image_tag }}
|
||||
imagePullPolicy: {{ k8s_image_pull_policy }}
|
||||
resources:
|
||||
requests:
|
||||
cpu: {{ loadbalancer_apiserver_cpu_requests }}
|
||||
memory: {{ loadbalancer_apiserver_memory_requests }}
|
||||
{% if loadbalancer_apiserver_healthcheck_port is defined -%}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ loadbalancer_apiserver_healthcheck_port }}
|
||||
{% endif -%}
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx
|
||||
name: etc-nginx
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: etc-nginx
|
||||
hostPath:
|
||||
path: {{ nginx_config_dir }}
|
||||
Reference in New Issue
Block a user