Browse Source

[k8s] Introduce helm_client_tag label.

Added label helm_client_tag to allow user to specify helm client
container version.

Task: 39294
Story: 2007514

Change-Id: I5d1cf238511951ac4a1849ca66b74dc747865391
Signed-off-by: Diogo Guerra <diogo.filipe.tomas.guerra@cern.ch>
changes/42/715142/6
Diogo Guerra 2 years ago committed by Diogo Guerra
parent
commit
06659759f1
  1. 6
      doc/source/user/index.rst
  2. 1
      magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh
  3. 2
      magnum/drivers/common/templates/kubernetes/helm/ingress-nginx.sh
  4. 2
      magnum/drivers/common/templates/kubernetes/helm/metrics-server.sh
  5. 2
      magnum/drivers/common/templates/kubernetes/helm/prometheus-adapter.sh
  6. 2
      magnum/drivers/common/templates/kubernetes/helm/prometheus-operator.sh
  7. 1
      magnum/drivers/heat/k8s_fedora_template_def.py
  8. 6
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml
  9. 5
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml
  10. 6
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubecluster.yaml
  11. 5
      magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml
  12. 6
      magnum/tests/unit/drivers/test_template_definition.py
  13. 4
      releasenotes/notes/helm_client_label-1d6e70dfcf8ecd0d.yaml

6
doc/source/user/index.rst

@ -1469,6 +1469,12 @@ _`tiller_namespace`
Configure in which namespace tiller is going to be installed.
Default: magnum-tiller
_`helm_client_tag`
The version of the helm client to use.
The image can be stored in a private registry and the
cluster can pull it using the container_infra_prefix label.
Default: dev
_`master_lb_floating_ip_enabled`
Controls if Magnum allocates floating IP for the load balancer of master
nodes. This label only takes effect when the template property

1
magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.sh

@ -117,6 +117,7 @@ EXTERNAL_NETWORK_ID="$EXTERNAL_NETWORK_ID"
TILLER_ENABLED="$TILLER_ENABLED"
TILLER_TAG="$TILLER_TAG"
TILLER_NAMESPACE="$TILLER_NAMESPACE"
HELM_CLIENT_TAG="$HELM_CLIENT_TAG"
NODE_PROBLEM_DETECTOR_TAG="$NODE_PROBLEM_DETECTOR_TAG"
NGINX_INGRESS_CONTROLLER_TAG="$NGINX_INGRESS_CONTROLLER_TAG"
NGINX_INGRESS_CONTROLLER_CHART_TAG="$NGINX_INGRESS_CONTROLLER_CHART_TAG"

2
magnum/drivers/common/templates/kubernetes/helm/ingress-nginx.sh

@ -214,7 +214,7 @@ spec:
serviceAccountName: tiller
containers:
- name: config-helm
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:dev
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:${HELM_CLIENT_TAG}
command:
- bash
args:

2
magnum/drivers/common/templates/kubernetes/helm/metrics-server.sh

@ -67,7 +67,7 @@ spec:
serviceAccountName: tiller
containers:
- name: config-helm
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:dev
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:${HELM_CLIENT_TAG}
command:
- bash
args:

2
magnum/drivers/common/templates/kubernetes/helm/prometheus-adapter.sh

@ -89,7 +89,7 @@ spec:
serviceAccountName: tiller
containers:
- name: config-helm
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:dev
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:${HELM_CLIENT_TAG}
command:
- bash
args:

2
magnum/drivers/common/templates/kubernetes/helm/prometheus-operator.sh

@ -170,7 +170,7 @@ spec:
serviceAccountName: tiller
containers:
- name: config-helm
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:dev
image: ${CONTAINER_INFRA_PREFIX:-docker.io/openstackmagnum/}helm-client:${HELM_CLIENT_TAG}
command:
- bash
args:

1
magnum/drivers/heat/k8s_fedora_template_def.py

@ -106,6 +106,7 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
'tiller_enabled',
'tiller_tag',
'tiller_namespace',
'helm_client_tag',
'traefik_ingress_controller_tag',
'node_problem_detector_tag',
'nginx_ingress_controller_tag',

6
magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml

@ -728,6 +728,11 @@ parameters:
description: namespace where tiller will be installed.
default: "magnum-tiller"
helm_client_tag:
type: string
description: tag of helm container
default: "dev"
auto_healing_enabled:
type: boolean
description: >
@ -1207,6 +1212,7 @@ resources:
tiller_enabled: {get_param: tiller_enabled}
tiller_tag: {get_param: tiller_tag}
tiller_namespace: {get_param: tiller_namespace}
helm_client_tag: {get_param: helm_client_tag}
node_problem_detector_tag: {get_param: node_problem_detector_tag}
nginx_ingress_controller_tag: {get_param: nginx_ingress_controller_tag}
nginx_ingress_controller_chart_tag: {get_param: nginx_ingress_controller_chart_tag}

5
magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml

@ -504,6 +504,10 @@ parameters:
type: string
description: namespace where tiller will be installed
helm_client_tag:
type: string
description: tag of helm container
auto_healing_enabled:
type: boolean
description: >
@ -792,6 +796,7 @@ resources:
"$TILLER_ENABLED": {get_param: tiller_enabled}
"$TILLER_TAG": {get_param: tiller_tag}
"$TILLER_NAMESPACE": {get_param: tiller_namespace}
"$HELM_CLIENT_TAG": {get_param: helm_client_tag}
"$NODE_PROBLEM_DETECTOR_TAG": {get_param: node_problem_detector_tag}
"$NGINX_INGRESS_CONTROLLER_TAG": {get_param: nginx_ingress_controller_tag}
"$NGINX_INGRESS_CONTROLLER_CHART_TAG": {get_param: nginx_ingress_controller_chart_tag}

6
magnum/drivers/k8s_fedora_coreos_v1/templates/kubecluster.yaml

@ -728,6 +728,11 @@ parameters:
description: namespace where tiller will be installed.
default: "magnum-tiller"
helm_client_tag:
type: string
description: tag of helm container
default: "dev"
auto_healing_enabled:
type: boolean
description: >
@ -1219,6 +1224,7 @@ resources:
tiller_enabled: {get_param: tiller_enabled}
tiller_tag: {get_param: tiller_tag}
tiller_namespace: {get_param: tiller_namespace}
helm_client_tag: {get_param: helm_client_tag}
node_problem_detector_tag: {get_param: node_problem_detector_tag}
nginx_ingress_controller_tag: {get_param: nginx_ingress_controller_tag}
nginx_ingress_controller_chart_tag: {get_param: nginx_ingress_controller_chart_tag}

5
magnum/drivers/k8s_fedora_coreos_v1/templates/kubemaster.yaml

@ -508,6 +508,10 @@ parameters:
type: string
description: namespace where tiller will be installed
helm_client_tag:
type: string
description: tag of helm container
auto_healing_enabled:
type: boolean
description: >
@ -803,6 +807,7 @@ resources:
"$TILLER_ENABLED": {get_param: tiller_enabled}
"$TILLER_TAG": {get_param: tiller_tag}
"$TILLER_NAMESPACE": {get_param: tiller_namespace}
"$HELM_CLIENT_TAG": {get_param: helm_client_tag}
"$NODE_PROBLEM_DETECTOR_TAG": {get_param: node_problem_detector_tag}
"$NGINX_INGRESS_CONTROLLER_TAG": {get_param: nginx_ingress_controller_tag}
"$NGINX_INGRESS_CONTROLLER_CHART_TAG": {get_param: nginx_ingress_controller_chart_tag}

6
magnum/tests/unit/drivers/test_template_definition.py

@ -567,6 +567,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'tiller_tag')
tiller_namespace = mock_cluster.labels.get(
'tiller_namespace')
helm_client_tag = mock_cluster.labels.get(
'helm_client_tag')
npd_tag = mock_cluster.labels.get('node_problem_detector_tag')
traefik_ingress_controller_tag = mock_cluster.labels.get(
'traefik_ingress_controller_tag')
@ -687,6 +689,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'tiller_enabled': tiller_enabled,
'tiller_tag': tiller_tag,
'tiller_namespace': tiller_namespace,
'helm_client_tag': helm_client_tag,
'node_problem_detector_tag': npd_tag,
'auto_healing_enabled': auto_healing_enabled,
'auto_healing_controller': auto_healing_controller,
@ -1070,6 +1073,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'tiller_tag')
tiller_namespace = mock_cluster.labels.get(
'tiller_namespace')
helm_client_tag = mock_cluster.labels.get(
'helm_client_tag')
npd_tag = mock_cluster.labels.get('node_problem_detector_tag')
traefik_ingress_controller_tag = mock_cluster.labels.get(
'traefik_ingress_controller_tag')
@ -1192,6 +1197,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'tiller_enabled': tiller_enabled,
'tiller_tag': tiller_tag,
'tiller_namespace': tiller_namespace,
'helm_client_tag': helm_client_tag,
'node_problem_detector_tag': npd_tag,
'auto_healing_enabled': auto_healing_enabled,
'auto_healing_controller': auto_healing_controller,

4
releasenotes/notes/helm_client_label-1d6e70dfcf8ecd0d.yaml

@ -0,0 +1,4 @@
---
features:
- |
Added label helm_client_tag to allow user to specify helm client container version.
Loading…
Cancel
Save