Skip to content
Snippets Groups Projects
Unverified Commit 4c37399c authored by cortex3's avatar cortex3 Committed by GitHub
Browse files

fix hcloud-cloud-controller-manager not working in certain setups (#10297)

parent cd692831
Branches
Tags
No related merge requests found
......@@ -3,6 +3,7 @@
# hcloud_api_token: ""
# token_secret_name: hcloud
# with_networks: false # Use the hcloud controller-manager with networks support https://github.com/hetznercloud/hcloud-cloud-controller-manager#networks-support
# network_name: # network name/ID: If you manage the network yourself it might still be required to let the CCM know about private networks
# service_account_name: cloud-controller-manager
#
# controller_image_tag: "latest"
......@@ -12,3 +13,10 @@
# ## arg1: "value1"
# ## arg2: "value2"
# controller_extra_args: {}
#
# load_balancers_location: # mutually exclusive with load_balancers_network_zone
# load_balancers_network_zone:
# load_balancers_disable_private_ingress: # set to true if using IPVS based plugins https://github.com/hetznercloud/hcloud-cloud-controller-manager/blob/main/docs/load_balancers.md#sample-service-with-networks
# load_balancers_use_private_ip: # set to true if using private networks
# load_balancers_enabled:
# network_routes_enabled:
......@@ -70,3 +70,27 @@ spec:
secretKeyRef:
name: {{ external_hcloud_cloud.token_secret_name }}
key: network
{% if external_hcloud_cloud.network_routes_enabled is defined %}
- name: HCLOUD_NETWORK_ROUTES_ENABLED
value: "{{ external_hcloud_cloud.network_routes_enabled }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_location is defined %}
- name: HCLOUD_LOAD_BALANCERS_LOCATION
value: "{{ external_hcloud_cloud.load_balancers_location }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_network_zone is defined %}
- name: HCLOUD_LOAD_BALANCERS_NETWORK_ZONE
value: "{{ external_hcloud_cloud.load_balancers_network_zone }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_disable_private_ingress is defined %}
- name: HCLOUD_LOAD_BALANCERS_DISABLE_PRIVATE_INGRESS
value: "{{ external_hcloud_cloud.load_balancers_disable_private_ingress }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_use_private_ip is defined %}
- name: HCLOUD_LOAD_BALANCERS_USE_PRIVATE_IP
value: "{{ external_hcloud_cloud.load_balancers_use_private_ip }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_enabled is defined %}
- name: HCLOUD_LOAD_BALANCERS_ENABLED
value: "{{ external_hcloud_cloud.load_balancers_enabled }}"
{% endif %}
......@@ -61,3 +61,34 @@ spec:
secretKeyRef:
name: {{ external_hcloud_cloud.token_secret_name }}
key: token
{% if external_hcloud_cloud.network_name is defined %}
- name: HCLOUD_NETWORK
valueFrom:
secretKeyRef:
name: {{ external_hcloud_cloud.token_secret_name }}
key: network
{% endif %}
{% if external_hcloud_cloud.network_routes_enabled is defined %}
- name: HCLOUD_NETWORK_ROUTES_ENABLED
value: "{{ external_hcloud_cloud.network_routes_enabled }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_location is defined %}
- name: HCLOUD_LOAD_BALANCERS_LOCATION
value: "{{ external_hcloud_cloud.load_balancers_location }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_network_zone is defined %}
- name: HCLOUD_LOAD_BALANCERS_NETWORK_ZONE
value: "{{ external_hcloud_cloud.load_balancers_network_zone }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_disable_private_ingress is defined %}
- name: HCLOUD_LOAD_BALANCERS_DISABLE_PRIVATE_INGRESS
value: "{{ external_hcloud_cloud.load_balancers_disable_private_ingress }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_use_private_ip is defined %}
- name: HCLOUD_LOAD_BALANCERS_USE_PRIVATE_IP
value: "{{ external_hcloud_cloud.load_balancers_use_private_ip }}"
{% endif %}
{% if external_hcloud_cloud.load_balancers_enabled is defined %}
- name: HCLOUD_LOAD_BALANCERS_ENABLED
value: "{{ external_hcloud_cloud.load_balancers_enabled }}"
{% endif %}
......@@ -6,6 +6,10 @@ metadata:
namespace: kube-system
data:
token: "{{ external_hcloud_cloud.hcloud_api_token | b64encode }}"
{% if external_hcloud_cloud.with_networks %}
{% if external_hcloud_cloud.with_networks or external_hcloud_cloud.network_name is defined %}
{% if network_id is defined%}
network: "{{ network_id | b64encode }}"
{% else %}
network: "{{ external_hcloud_cloud.network_name | b64encode }}"
{% endif %}
{% endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment