Browse Source

Add heat_container_agent_tag label

Add heat_container_agent_tag label to allow users select the
heat-agent tag. Stein default: stein-dev

story: 2003992
task: 26936

Change-Id: I6a8d8dbb2ec7bd4b7d01fa7cd790a8966ea88f73
Signed-off-by: Spyros Trigazis <spyridon.trigazis@cern.ch>
changes/27/612727/4
Spyros Trigazis 3 years ago
parent
commit
c98e9525c7
  1. 8
      doc/source/user/index.rst
  2. 2
      magnum/drivers/common/templates/kubernetes/fragments/start-container-agent.sh
  3. 1
      magnum/drivers/common/templates/kubernetes/fragments/write-heat-params-master.yaml
  4. 1
      magnum/drivers/common/templates/kubernetes/fragments/write-heat-params.yaml
  5. 3
      magnum/drivers/heat/k8s_fedora_template_def.py
  6. 7
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml
  7. 5
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml
  8. 5
      magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml
  9. 6
      magnum/tests/unit/drivers/test_template_definition.py
  10. 5
      releasenotes/notes/heat-container-agent-tag-92848c1062c16c76.yaml

8
doc/source/user/index.rst

@ -321,6 +321,8 @@ the table are linked to more details elsewhere in the user guide.
+---------------------------------------+--------------------+---------------+
| `flannel_tag`_ | see below | see below |
+---------------------------------------+--------------------+---------------+
| `heat_container_agent_tag`_ | see below | see below |
+---------------------------------------+--------------------+---------------+
| `kube_dashboard_enabled`_ | - true | true |
| | - false | |
+---------------------------------------+--------------------+---------------+
@ -1108,6 +1110,12 @@ _`flannel_tag`
If unset, the current Magnum version's a default flannel version.
For queens, v0.9.0
_`heat_container_agent_tag`
This label allows users to select `a specific heat_container_agent
version, based on its container tag
<https://hub.docker.com/r/openstackmagnum/heat-container-agent/tags/>`_.
Stein-default: stein-dev
_`kube_dashboard_enabled`
This label triggers the deployment of the kubernetes dashboard.
The default value is 1, meaning it will be enabled.

2
magnum/drivers/common/templates/kubernetes/fragments/start-container-agent.sh

@ -11,6 +11,6 @@ atomic install \
--system-package no \
--set REQUESTS_CA_BUNDLE=/etc/pki/tls/certs/ca-bundle.crt \
--name heat-container-agent \
${_prefix}heat-container-agent:rocky-stable
${_prefix}heat-container-agent:${HEAT_CONTAINER_AGENT_TAG}
systemctl start heat-container-agent

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

@ -78,3 +78,4 @@ write_files:
KUBE_SERVICE_ACCOUNT_PRIVATE_KEY="$KUBE_SERVICE_ACCOUNT_PRIVATE_KEY"
PROMETHEUS_TAG="$PROMETHEUS_TAG"
GRAFANA_TAG="$GRAFANA_TAG"
HEAT_CONTAINER_AGENT_TAG="$HEAT_CONTAINER_AGENT_TAG"

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

@ -53,3 +53,4 @@ write_files:
KUBELET_OPTIONS="$KUBELET_OPTIONS"
KUBEPROXY_OPTIONS="$KUBEPROXY_OPTIONS"
OCTAVIA_ENABLED="$OCTAVIA_ENABLED"
HEAT_CONTAINER_AGENT_TAG="$HEAT_CONTAINER_AGENT_TAG"

3
magnum/drivers/heat/k8s_fedora_template_def.py

@ -111,7 +111,8 @@ class K8sFedoraTemplateDefinition(k8s_template_def.K8sTemplateDefinition):
'etcd_tag', 'flannel_tag',
'cloud_provider_enabled',
'prometheus_tag',
'grafana_tag']
'grafana_tag',
'heat_container_agent_tag']
for label in label_list:
label_value = cluster.labels.get(label)

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

@ -504,6 +504,11 @@ parameters:
description: tag of grafana container
default: 5.1.5
heat_container_agent_tag:
type: string
description: tag of the heat_container_agent system container
default: stein-dev
resources:
######################################################################
@ -730,6 +735,7 @@ resources:
kube_service_account_private_key: {get_param: kube_service_account_private_key}
prometheus_tag: {get_param: prometheus_tag}
grafana_tag: {get_param: grafana_tag}
heat_container_agent_tag: {get_param: heat_container_agent_tag}
######################################################################
@ -809,6 +815,7 @@ resources:
kubelet_options: {get_param: kubelet_options}
kubeproxy_options: {get_param: kubeproxy_options}
octavia_enabled: {get_param: octavia_enabled}
heat_container_agent_tag: {get_param: heat_container_agent_tag}
outputs:

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

@ -399,6 +399,10 @@ parameters:
type: string
description: tag of grafana container
heat_container_agent_tag:
type: string
description: tag of the heat_container_agent system container
resources:
master_wait_handle:
@ -511,6 +515,7 @@ resources:
"$KUBE_SERVICE_ACCOUNT_PRIVATE_KEY": {get_param: kube_service_account_private_key}
"$PROMETHEUS_TAG": {get_param: prometheus_tag}
"$GRAFANA_TAG": {get_param: grafana_tag}
"$HEAT_CONTAINER_AGENT_TAG": {get_param: heat_container_agent_tag}
install_openstack_ca:
type: OS::Heat::SoftwareConfig

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

@ -276,6 +276,10 @@ parameters:
type: boolean
description: Enable or disable the openstack kubernetes cloud provider
heat_container_agent_tag:
type: string
description: tag of the heat_container_agent system container
resources:
minion_wait_handle:
@ -349,6 +353,7 @@ resources:
$KUBELET_OPTIONS: {get_param: kubelet_options}
$KUBEPROXY_OPTIONS: {get_param: kubeproxy_options}
$OCTAVIA_ENABLED: {get_param: octavia_enabled}
$HEAT_CONTAINER_AGENT_TAG: {get_param: heat_container_agent_tag}
install_openstack_ca:
type: OS::Heat::SoftwareConfig

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

@ -405,6 +405,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'prometheus_tag')
grafana_tag = mock_cluster.labels.get(
'grafana_tag')
heat_container_agent_tag = mock_cluster.labels.get(
'heat_container_agent_tag')
k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition()
@ -455,6 +457,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'portal_network_cidr': service_cluster_ip_range,
'prometheus_tag': prometheus_tag,
'grafana_tag': grafana_tag,
'heat_container_agent_tag': heat_container_agent_tag,
}}
mock_get_params.assert_called_once_with(mock_context,
mock_cluster_template,
@ -578,6 +581,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'prometheus_tag')
grafana_tag = mock_cluster.labels.get(
'grafana_tag')
heat_container_agent_tag = mock_cluster.labels.get(
'heat_container_agent_tag')
k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition()
@ -630,6 +635,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase):
'portal_network_cidr': service_cluster_ip_range,
'prometheus_tag': prometheus_tag,
'grafana_tag': grafana_tag,
'heat_container_agent_tag': heat_container_agent_tag,
}}
mock_get_params.assert_called_once_with(mock_context,
mock_cluster_template,

5
releasenotes/notes/heat-container-agent-tag-92848c1062c16c76.yaml

@ -0,0 +1,5 @@
---
features:
- |
Add heat_container_agent_tag label to allow users select the heat-agent
tag. Stein default: stein-dev
Loading…
Cancel
Save