[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>
This commit is contained in:
Diogo Guerra 2020-03-26 17:20:03 +09:00 committed by Diogo Guerra
parent 01629398c6
commit 06659759f1
13 changed files with 44 additions and 4 deletions

View File

@ -1469,6 +1469,12 @@ _`tiller_namespace`
Configure in which namespace tiller is going to be installed. Configure in which namespace tiller is going to be installed.
Default: magnum-tiller 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` _`master_lb_floating_ip_enabled`
Controls if Magnum allocates floating IP for the load balancer of master Controls if Magnum allocates floating IP for the load balancer of master
nodes. This label only takes effect when the template property nodes. This label only takes effect when the template property

View File

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

View File

@ -214,7 +214,7 @@ spec:
serviceAccountName: tiller serviceAccountName: tiller
containers: containers:
- name: config-helm - 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: command:
- bash - bash
args: args:

View File

@ -67,7 +67,7 @@ spec:
serviceAccountName: tiller serviceAccountName: tiller
containers: containers:
- name: config-helm - 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: command:
- bash - bash
args: args:

View File

@ -89,7 +89,7 @@ spec:
serviceAccountName: tiller serviceAccountName: tiller
containers: containers:
- name: config-helm - 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: command:
- bash - bash
args: args:

View File

@ -170,7 +170,7 @@ spec:
serviceAccountName: tiller serviceAccountName: tiller
containers: containers:
- name: config-helm - 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: command:
- bash - bash
args: args:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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