diff --git a/magnum/api/controllers/v1/cluster_template.py b/magnum/api/controllers/v1/cluster_template.py index dbd08e4dd0..997ad53cd4 100644 --- a/magnum/api/controllers/v1/cluster_template.py +++ b/magnum/api/controllers/v1/cluster_template.py @@ -90,7 +90,7 @@ class ClusterTemplate(base.APIBase): """The size in GB of the docker volume""" cluster_distro = wtypes.StringType(min_length=1, max_length=255) - """The Cluster distro for the Cluster, e.g. coreos, fedora-atomic, etc.""" + """The Cluster distro for the Cluster, e.g. coreos, fedora-coreos, etc.""" links = wsme.wsattr([link.Link], readonly=True) """A list containing a self link and associated ClusterTemplate links""" @@ -205,7 +205,7 @@ class ClusterTemplate(base.APIBase): apiserver_port=8080, docker_volume_size=25, docker_storage_driver='devicemapper', - cluster_distro='fedora-atomic', + cluster_distro='fedora-coreos', coe=fields.ClusterType.KUBERNETES, http_proxy='http://proxy.com:123', https_proxy='https://proxy.com:123', @@ -269,11 +269,6 @@ class ClusterTemplatesController(base.Controller): "different storage driver, such as overlay2. overlay2 will be set " "as the default storage driver from Victoria cycle in Magnum.") - _fedora_atomic_deprecation_note = ( - "The fedora_atomic driver is deprecated in favor of the fedora_coreos " - "driver. Please migrate to the fedora_coreos driver. fedora_atomic " - "driver will be removed in a future Magnum version.") - def _generate_name_for_cluster_template(self, context): """Generate a random name like: zeta-22-model.""" @@ -431,12 +426,6 @@ class ClusterTemplatesController(base.Controller): DeprecationWarning) LOG.warning(self._devicemapper_overlay_deprecation_note) - if (cluster_template_dict['coe'] == 'kubernetes' and - cluster_template_dict['cluster_distro'] == 'fedora-atomic'): - warnings.warn(self._fedora_atomic_deprecation_note, - DeprecationWarning) - LOG.warning(self._fedora_atomic_deprecation_note) - if (cluster_template_dict['coe'] == 'kubernetes' and cluster_template_dict['cluster_distro'] == 'coreos'): warnings.warn(self._coreos_deprecation_note, diff --git a/magnum/drivers/common/templates/fragments/configure_docker_storage_driver_atomic.sh b/magnum/drivers/common/templates/fragments/configure_docker_storage_driver_atomic.sh deleted file mode 100644 index ee1aaba5fd..0000000000 --- a/magnum/drivers/common/templates/fragments/configure_docker_storage_driver_atomic.sh +++ /dev/null @@ -1,53 +0,0 @@ -# This file contains docker storage drivers configuration for fedora -# atomic hosts, as supported by Magnum. - -# * Remove any existing docker-storage configuration. In case of an -# existing configuration, docker-storage-setup will fail. -# * Remove docker storage graph -ssh_cmd="ssh -F /srv/magnum/.ssh/config root@localhost" - -clear_docker_storage () { - # stop docker - $ssh_cmd systemctl stop docker - $ssh_cmd systemctl disable docker-storage-setup - # clear storage graph - $ssh_cmd rm -rf /var/lib/docker/* - - if [ -f /etc/sysconfig/docker-storage ]; then - sed -i "/^DOCKER_STORAGE_OPTIONS=/ s/=.*/=/" /etc/sysconfig/docker-storage - fi -} - -# Configure generic docker storage driver. -configure_storage_driver_generic() { - clear_docker_storage - - if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then - $ssh_cmd mkfs.xfs -f ${device_path} - echo "${device_path} /var/lib/docker xfs defaults 0 0" >> /etc/fstab - $ssh_cmd mount -a - fi - - echo "DOCKER_STORAGE_OPTIONS=\"--storage-driver $1\"" > /etc/sysconfig/docker-storage -} - -# Configure docker storage with devicemapper using direct LVM -configure_devicemapper () { - clear_docker_storage - - echo "GROWROOT=True" > /etc/sysconfig/docker-storage-setup - echo "STORAGE_DRIVER=devicemapper" >> /etc/sysconfig/docker-storage-setup - - if [ -n "$DOCKER_VOLUME_SIZE" ] && [ "$DOCKER_VOLUME_SIZE" -gt 0 ]; then - - $ssh_cmd pvcreate -f ${device_path} - $ssh_cmd vgcreate docker ${device_path} - - echo "VG=docker" >> /etc/sysconfig/docker-storage-setup - else - echo "ROOT_SIZE=5GB" >> /etc/sysconfig/docker-storage-setup - echo "DATA_SIZE=95%FREE" >> /etc/sysconfig/docker-storage-setup - fi - - $ssh_cmd docker-storage-setup -} diff --git a/magnum/drivers/k8s_fedora_atomic_v1/__init__.py b/magnum/drivers/k8s_fedora_atomic_v1/__init__.py deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/magnum/drivers/k8s_fedora_atomic_v1/driver.py b/magnum/drivers/k8s_fedora_atomic_v1/driver.py deleted file mode 100644 index b2c046c998..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/driver.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2016 Rackspace Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from oslo_log import log as logging - -from magnum.drivers.heat import driver -from magnum.drivers.k8s_fedora_atomic_v1 import template_def - -LOG = logging.getLogger(__name__) - - -class Driver(driver.FedoraKubernetesDriver): - - @property - def provides(self): - return [ - {'server_type': 'vm', - 'os': 'fedora-atomic', - 'coe': 'kubernetes'}, - ] - - def get_template_definition(self): - return template_def.AtomicK8sTemplateDefinition() diff --git a/magnum/drivers/k8s_fedora_atomic_v1/template_def.py b/magnum/drivers/k8s_fedora_atomic_v1/template_def.py deleted file mode 100644 index afd99d12fc..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/template_def.py +++ /dev/null @@ -1,33 +0,0 @@ -# Copyright 2016 Rackspace Inc. All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -import os - -import magnum.conf -from magnum.drivers.heat import k8s_fedora_template_def as kftd - -CONF = magnum.conf.CONF - - -class AtomicK8sTemplateDefinition(kftd.K8sFedoraTemplateDefinition): - """Kubernetes template for a Fedora Atomic VM.""" - - @property - def driver_module_path(self): - return __name__[:__name__.rindex('.')] - - @property - def template_path(self): - return os.path.join(os.path.dirname(os.path.realpath(__file__)), - 'templates/kubecluster.yaml') diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/COPYING b/magnum/drivers/k8s_fedora_atomic_v1/templates/COPYING deleted file mode 100644 index d645695673..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/COPYING +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml deleted file mode 100644 index 00769d1c95..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubecluster.yaml +++ /dev/null @@ -1,1548 +0,0 @@ -heat_template_version: queens - -description: > - This template will boot a Kubernetes cluster with one or more - minions (as specified by the number_of_minions parameter, which - defaults to 1). - -conditions: - create_cluster_resources: - equals: - - get_param: is_cluster_stack - - true - - is_master: - and: - - equals: - - get_param: master_role - - "master" - - equals: - - get_param: worker_role - - "" - - is_worker: - not: - equals: - - get_param: worker_role - - "" - - master_only: - or: - - create_cluster_resources - - is_master - - worker_only: - or: - - create_cluster_resources - - is_worker - - calico_v3_3: - yaql: - expression: $.data.calico_tag.startsWith("v3.3.") - data: - calico_tag: {get_param: calico_tag} - -parameters: - - # needs to become a list if we want to join master nodes? - existing_master_private_ip: - type: string - default: "" - - is_cluster_stack: - type: boolean - default: false - - master_role: - type: string - default: "" - - worker_role: - type: string - default: "" - - existing_security_group: - type: string - default: "" - - ssh_key_name: - type: string - description: name of ssh key to be provisioned on our server - default: "" - - ssh_public_key: - type: string - description: The public ssh key to add in all nodes - default: "" - - external_network: - type: string - description: uuid of a network to use for floating ip addresses - - fixed_network: - type: string - description: uuid/name of an existing network to use to provision machines - default: "" - - fixed_network_name: - type: string - description: name of a private network to use to provision machines - - fixed_subnet: - type: string - description: uuid/name of an existing subnet to use to provision machines - default: "" - - master_image: - type: string - description: glance image used to boot the server - # When creating a new minion nodegroup this will not - # be provided by magnum. So make it default to "" - default: "" - - minion_image: - type: string - description: glance image used to boot the server - # When creating a new master nodegroup this will not - # be provided by magnum. So make it default to "" - default: "" - - master_flavor: - type: string - default: m1.small - description: flavor to use when booting the server for master nodes - - master_nodegroup_name: - type: string - default: "" - description: the name of the nodegroup where the node belongs - - worker_nodegroup_name: - type: string - default: "" - description: the name of the nodegroup where the node belongs - - heapster_enabled: - type: boolean - description: enable/disable the use of heapster - default: false - - metrics_server_enabled: - type: boolean - description: enable/disable the use of metrics-server - default: true - - metrics_server_chart_tag: - type: string - description: tag of the stable/metrics-server chart to install - default: v3.7.0 - - minion_flavor: - type: string - default: m1.small - description: flavor to use when booting the server for minions - - prometheus_monitoring: - type: boolean - default: false - description: > - whether or not to have the grafana-prometheus-cadvisor monitoring setup - - grafana_admin_passwd: - type: string - default: admin - hidden: true - description: > - admin user password for the Grafana monitoring interface - - dns_nameserver: - type: comma_delimited_list - description: address of a DNS nameserver reachable in your environment - default: 8.8.8.8 - - number_of_masters: - type: number - description: how many kubernetes masters to spawn - default: 1 - - number_of_minions: - type: number - description: how many kubernetes minions to spawn - default: 1 - - fixed_subnet_cidr: - type: string - description: network range for fixed ip network - default: 10.0.0.0/24 - - portal_network_cidr: - type: string - description: > - address range used by kubernetes for service portals - default: 10.254.0.0/16 - - network_driver: - type: string - description: network driver to use for instantiating container networks - default: flannel - - flannel_network_cidr: - type: string - description: network range for flannel overlay network - default: 10.100.0.0/16 - - flannel_network_subnetlen: - type: number - description: size of subnet assigned to each minion - default: 24 - - flannel_backend: - type: string - description: > - specify the backend for flannel, default vxlan backend - default: "vxlan" - constraints: - - allowed_values: ["udp", "vxlan", "host-gw"] - - system_pods_initial_delay: - type: number - description: > - health check, time to wait for system pods (podmaster, scheduler) to boot - (in seconds) - default: 30 - - system_pods_timeout: - type: number - description: > - health check, timeout for system pods (podmaster, scheduler) to answer. - (in seconds) - default: 5 - - admission_control_list: - type: string - description: > - List of admission control plugins to activate - default: "NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota" - - kube_allow_priv: - type: string - description: > - whether or not kubernetes should permit privileged containers. - default: "true" - constraints: - - allowed_values: ["true", "false"] - - boot_volume_size: - type: number - description: > - size of the cinder boot volume for nodes root volume - - boot_volume_type: - type: string - description: > - type of the cinder boot volume for nodes root volume - - etcd_volume_size: - type: number - description: > - size of the cinder volume for etcd storage - default: 0 - - etcd_volume_type: - type: string - description: > - type of a cinder volume for etcd storage - - docker_volume_size: - type: number - description: > - size of a cinder volume to allocate to docker for container/image - storage - default: 0 - - docker_volume_type: - type: string - description: > - type of a cinder volume to allocate to docker for container/image - storage - - docker_storage_driver: - type: string - description: docker storage driver name - default: "devicemapper" - - cgroup_driver: - type: string - description: > - cgroup driver name that kubelet should use, ideally the same as - the docker cgroup driver. - default: "cgroupfs" - - traefik_ingress_controller_tag: - type: string - description: tag of the traefik containers to be used. - default: v1.7.28 - - wait_condition_timeout: - type: number - description: > - timeout for the Wait Conditions - default: 6000 - - minions_to_remove: - type: comma_delimited_list - description: > - List of minions to be removed when doing an update. Individual minion may - be referenced several ways: (1) The resource name (e.g. ['1', '3']), - (2) The private IP address ['10.0.0.4', '10.0.0.6']. Note: the list should - be empty when doing an create. - default: [] - - discovery_url: - type: string - description: > - Discovery URL used for bootstrapping the etcd cluster. - - registry_enabled: - type: boolean - description: > - Indicates whether the docker registry is enabled. - default: false - - registry_port: - type: number - description: port of registry service - default: 5000 - - swift_region: - type: string - description: region of swift service - default: "" - - registry_container: - type: string - description: > - name of swift container which docker registry stores images in - default: "container" - - registry_insecure: - type: boolean - description: > - indicates whether to skip TLS verification between registry and backend storage - default: true - - registry_chunksize: - type: number - description: > - size fo the data segments for the swift dynamic large objects - default: 5242880 - - volume_driver: - type: string - description: volume driver to use for container storage - default: "" - - region_name: - type: string - description: A logically separate section of the cluster - - username: - type: string - description: > - user account - - password: - type: string - description: > - user password, not set in current implementation, only used to - fill in for Kubernetes config file - default: - ChangeMe - hidden: true - - loadbalancing_protocol: - type: string - description: > - The protocol which is used for load balancing. If you want to change - tls_disabled option to 'True', please change this to "HTTP". - default: TCP - constraints: - - allowed_values: ["TCP", "HTTP"] - - tls_disabled: - type: boolean - description: whether or not to disable TLS - default: False - - kube_dashboard_enabled: - type: boolean - description: whether or not to enable kubernetes dashboard - default: True - - influx_grafana_dashboard_enabled: - type: boolean - description: Enable influxdb with grafana dashboard for data from heapster - default: False - - verify_ca: - type: boolean - description: whether or not to validate certificate authority - - kubernetes_port: - type: number - description: > - The port which are used by kube-apiserver to provide Kubernetes - service. - default: 6443 - - cluster_uuid: - type: string - description: identifier for the cluster this template is generating - - magnum_url: - type: string - description: endpoint to retrieve TLS certs from - - http_proxy: - type: string - description: http proxy address for docker - default: "" - - https_proxy: - type: string - description: https proxy address for docker - default: "" - - no_proxy: - type: string - description: no proxies for docker - default: "" - - trustee_domain_id: - type: string - description: domain id of the trustee - - trustee_user_id: - type: string - description: user id of the trustee - - trustee_username: - type: string - description: username of the trustee - - trustee_password: - type: string - description: password of the trustee - hidden: true - - trust_id: - type: string - description: id of the trust which is used by the trustee - hidden: true - - auth_url: - type: string - description: url for keystone - - hyperkube_prefix: - type: string - description: prefix to use for hyperkube images - default: k8s.gcr.io/ - - kube_tag: - type: string - description: tag of the k8s containers used to provision the kubernetes cluster - default: v1.15.7 - - master_kube_tag: - type: string - description: tag of the k8s containers used to provision the kubernetes cluster - default: v1.15.7 - - minion_kube_tag: - type: string - description: tag of the k8s containers used to provision the kubernetes cluster - default: v1.15.7 - - # FIXME update cloud_provider_tag when a fix for PVC is released - # https://github.com/kubernetes/cloud-provider-openstack/pull/405 - cloud_provider_tag: - type: string - description: - tag of the kubernetes/cloud-provider-openstack - https://hub.docker.com/r/k8scloudprovider/openstack-cloud-controller-manager/tags/ - default: v1.15.0 - - cloud_provider_enabled: - type: boolean - description: Enable or disable the openstack kubernetes cloud provider - - etcd_tag: - type: string - description: tag of the etcd system container - default: v3.2.7 - - coredns_tag: - type: string - description: tag for coredns - default: 1.3.1 - - flannel_tag: - type: string - description: tag of the flannel container - default: v0.11.0-amd64 - - flannel_cni_tag: - type: string - description: tag of the flannel cni container - default: v0.3.0 - - kube_version: - type: string - description: version of kubernetes used for kubernetes cluster - default: v1.15.7 - - kube_dashboard_version: - type: string - description: version of kubernetes dashboard used for kubernetes cluster - default: v2.0.0 - - metrics_scraper_tag: - type: string - description: > - Tag of metrics-scraper for kubernetes dashboard. - default: v1.0.4 - - insecure_registry_url: - type: string - description: insecure registry url - default: "" - - container_infra_prefix: - type: string - description: > - prefix of container images used in the cluster, kubernetes components, - kubernetes-dashboard, coredns etc - constraints: - - allowed_pattern: "^$|.*/" - default: "" - - dns_service_ip: - type: string - description: > - address used by Kubernetes DNS service - default: 10.254.0.10 - - dns_cluster_domain: - type: string - description: > - domain name for cluster DNS - default: "cluster.local" - - openstack_ca: - type: string - hidden: true - description: The OpenStack CA certificate to install on the node. - - nodes_affinity_policy: - type: string - description: > - affinity policy for nodes server group - constraints: - - allowed_values: ["affinity", "anti-affinity", "soft-affinity", - "soft-anti-affinity"] - - availability_zone: - type: string - description: > - availability zone for master and nodes - default: "" - - cert_manager_api: - type: boolean - description: true if the kubernetes cert api manager should be enabled - default: false - - ca_key: - type: string - description: key of internal ca for the kube certificate api manager - default: "" - hidden: true - - calico_tag: - type: string - description: tag of the calico containers used to provision the calico node - default: v3.3.6 - - calico_kube_controllers_tag: - type: string - description: tag of the kube_controllers used to provision the calico node - default: v1.0.3 - - calico_ipv4pool: - type: string - description: Configure the IP pool from which Pod IPs will be chosen - default: "10.100.0.0/16" - - calico_ipv4pool_ipip: - type: string - description: IPIP Mode to use for the IPv4 POOL created at start up - default: "Off" - constraints: - - allowed_values: ["Always", "CrossSubnet", "Never", "Off"] - - pods_network_cidr: - type: string - description: Configure the IP pool/range from which pod IPs will be chosen - - ingress_controller: - type: string - description: > - ingress controller backend to use - default: "" - - ingress_controller_role: - type: string - description: > - node role where the ingress controller backend should run - default: "ingress" - - octavia_ingress_controller_tag: - type: string - description: Octavia ingress controller docker image tag. - default: "v1.15.0" - - kubelet_options: - type: string - description: > - additional options to be passed to the kubelet - default: "" - - kubeapi_options: - type: string - description: > - additional options to be passed to the api - default: "" - - kubecontroller_options: - type: string - description: > - additional options to be passed to the controller manager - default: "" - - kubeproxy_options: - type: string - description: > - additional options to be passed to the kube proxy - default: "" - - kubescheduler_options: - type: string - description: > - additional options to be passed to the scheduler - default: "" - - octavia_enabled: - type: boolean - description: > - whether or not to use Octavia for LoadBalancer type service. - default: False - - kube_service_account_key: - type: string - hidden: true - description: > - The signed cert will be used to verify the k8s service account tokens - during authentication. - - kube_service_account_private_key: - type: string - hidden: true - description: > - The private key will be used to sign generated k8s service account - tokens. - - prometheus_tag: - type: string - description: tag of the prometheus container - default: v1.8.2 - - grafana_tag: - type: string - 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: wallaby-stable-1 - - keystone_auth_enabled: - type: boolean - description: > - true if the keystone authN and authZ should be enabled - default: - true - - keystone_auth_default_policy: - type: string - description: Json read from /etc/magnum/keystone_auth_default_policy.json - default: "" - - k8s_keystone_auth_tag: - type: string - description: tag of the k8s_keystone_auth container - default: v1.15.0 - - monitoring_enabled: - type: boolean - description: Enable or disable prometheus-operator monitoring solution. - default: false - - monitoring_retention_days: - type: number - description: The number of time (in days) that prometheus metrics should be kept. - default: 14 - - monitoring_retention_size: - type: number - description: > - The maximum memory (in Gi) allowed to be used by prometheus server to store metrics. - default: 14 - - monitoring_interval_seconds: - type: number - description: > - The time interval (in seconds) between consecutive metric scrapings. - default: 30 - - monitoring_storage_class_name: - type: string - description: The kubernetes storage class name to use for the prometheus pvc. - default: "" - - monitoring_ingress_enabled: - type: boolean - description: Enable/disable configuration of ingresses for the monitoring services. - default: false - - cluster_basic_auth_secret: - type: string - description: > - The kubernetes secret name to use for the proxy basic auth username and password. - default: "" - - cluster_root_domain_name: - type: string - description: > - The root domain name to use for the cluster automatically set up applications. - default: "localhost" - - prometheus_operator_chart_tag: - type: string - description: The stable/prometheus-operator chart version to use. - default: v8.12.13 - - prometheus_adapter_enabled: - type: boolean - description: Enable or disable prometheus-adapter custom metrics. - default: true - - prometheus_adapter_chart_tag: - type: string - description: The stable/prometheus-adapter chart version to use. - default: 1.4.0 - - prometheus_adapter_configmap: - type: string - description: The prometheus adapter rules ConfigMap name to use as overwrite. - default: "" - - project_id: - type: string - description: > - project id of current project - - tiller_enabled: - type: boolean - description: Choose whether to install tiller or not. - default: true - - tiller_tag: - type: string - description: tag of tiller container - default: "v2.16.7" - - tiller_namespace: - type: string - description: namespace where tiller will be installed. - default: "magnum-tiller" - - helm_client_url: - type: string - description: url of helm client tarball - default: "" - - helm_client_sha256: - type: string - description: sha256 of helm client tarball - default: "018f9908cb950701a5d59e757653a790c66d8eda288625dbb185354ca6f41f6b" - - helm_client_tag: - type: string - description: > - release tag of helm client - https://github.com/helm/helm/releases - default: "v3.2.1" - - auto_healing_enabled: - type: boolean - description: > - true if the auto healing feature should be enabled - default: - false - - auto_healing_controller: - type: string - description: > - The service to be deployed for auto-healing. - default: "draino" - - magnum_auto_healer_tag: - type: string - description: tag of the magnum-auto-healer service. - default: "v1.15.0" - - auto_scaling_enabled: - type: boolean - description: > - true if the auto scaling feature should be enabled - default: - false - - cinder_csi_enabled: - type: boolean - description: > - true if the cinder csi feature should be enabled - default: - true - - cinder_csi_plugin_tag: - type: string - description: tag of cinder csi plugin - default: v1.16.0 - - csi_attacher_tag: - type: string - description: tag of csi attacher - default: v2.0.0 - - csi_provisioner_tag: - type: string - description: tag of csi provisioner - default: v1.4.0 - - csi_snapshotter_tag: - type: string - description: tag of csi snapshotter - default: v1.2.2 - - csi_resizer_tag: - type: string - description: tag of csi resizer - default: v0.3.0 - - csi_node_driver_registrar_tag: - type: string - description: tag of csi node driver registrar - default: v1.1.0 - - node_problem_detector_tag: - type: string - description: tag of the node problem detector container - default: v0.6.2 - - nginx_ingress_controller_tag: - type: string - description: nginx ingress controller docker image tag - default: 0.32.0 - - nginx_ingress_controller_chart_tag: - type: string - description: nginx ingress controller helm chart tag - default: v1.36.3 - - draino_tag: - type: string - description: tag of the draino container - default: abf028a - - autoscaler_tag: - type: string - description: tag of the autoscaler container - default: v1.0 - - min_node_count: - type: number - description: > - minimum node count of cluster workers when doing scale down - default: 0 - - max_node_count: - type: number - description: > - maximum node count of cluster workers when doing scale up - - update_max_batch_size: - type: number - description: > - max batch size when doing rolling upgrade - default: 1 - - npd_enabled: - type: boolean - description: > - true if the npd service should be launched - default: - true - - ostree_remote: - type: string - description: The ostree remote branch to upgrade - default: '' - - ostree_commit: - type: string - description: The ostree commit to deploy - default: '' - - use_podman: - type: boolean - description: > - if true, run system containers for kubernetes, etcd and heat-agent - default: - false - - selinux_mode: - type: string - description: > - Choose SELinux mode - default: "permissive" - constraints: - - allowed_values: ["enforcing", "permissive", "disabled"] - - kube_image_digest: - type: string - description: > - The digest of the image which should match the given kube_tag - default: '' - - container_runtime: - type: string - description: The container runtime to install - default: 'host-docker' - - containerd_version: - type: string - description: The containerd version to download from https://github.com/containerd/containerd/releases - default: '1.4.4' - - containerd_tarball_url: - type: string - description: Url location of the containerd tarball. - default: '' - - containerd_tarball_sha256: - type: string - description: sha256 of the target containerd tarball. - default: '96641849cb78a0a119223a427dfdc1ade88412ef791a14193212c8c8e29d447b' - - post_install_manifest_url: - type: string - description: > - Post install manifest URL used to setup some cloud provider/vendor - specific configs - default: "" - - master_lb_allowed_cidrs: - type: comma_delimited_list - description: The allowed CIDR list for master load balancer - default: [] - -resources: - - ###################################################################### - # - # network resources. allocate a network and router for our server. - # Important: the Load Balancer feature in Kubernetes requires that - # the name for the fixed_network must be "private" for the - # address lookup in Kubernetes to work properly - # - - network: - condition: create_cluster_resources - type: ../../common/templates/network.yaml - properties: - existing_network: {get_param: fixed_network} - existing_subnet: {get_param: fixed_subnet} - private_network_cidr: {get_param: fixed_subnet_cidr} - dns_nameserver: {get_param: dns_nameserver} - external_network: {get_param: external_network} - private_network_name: {get_param: fixed_network_name} - - api_lb: - condition: create_cluster_resources - type: ../../common/templates/lb_api.yaml - properties: - fixed_subnet: {get_attr: [network, fixed_subnet]} - external_network: {get_param: external_network} - protocol: {get_param: loadbalancing_protocol} - port: {get_param: kubernetes_port} - allowed_cidrs: {get_param: master_lb_allowed_cidrs} - - etcd_lb: - condition: create_cluster_resources - type: ../../common/templates/lb_etcd.yaml - properties: - fixed_subnet: {get_attr: [network, fixed_subnet]} - protocol: {get_param: loadbalancing_protocol} - port: 2379 - allowed_cidrs: {get_param: master_lb_allowed_cidrs} - - ###################################################################### - # - # security groups. we need to permit network traffic of various - # sorts. - # - - secgroup_kube_master: - condition: create_cluster_resources - type: OS::Neutron::SecurityGroup - properties: - rules: - - protocol: icmp - - protocol: tcp - port_range_min: 22 - port_range_max: 22 - - protocol: tcp - port_range_min: 7080 - port_range_max: 7080 - - protocol: tcp - port_range_min: 8080 - port_range_max: 8080 - - protocol: tcp - port_range_min: 2379 - port_range_max: 2379 - - protocol: tcp - port_range_min: 2380 - port_range_max: 2380 - - protocol: tcp - port_range_min: 6443 - port_range_max: 6443 - - protocol: tcp - port_range_min: 9100 - port_range_max: 9100 - - protocol: tcp - port_range_min: 10250 - port_range_max: 10250 - - protocol: tcp - port_range_min: 30000 - port_range_max: 32767 - - protocol: udp - port_range_min: 8472 - port_range_max: 8472 - - secgroup_kube_minion: - condition: create_cluster_resources - type: OS::Neutron::SecurityGroup - properties: - rules: - - protocol: icmp - # Default port range for external service ports. - # In future, if the option `manage-security-groups` for ccm works - # well, we could remove this rule here. - # The PR in ccm is - # https://github.com/kubernetes/cloud-provider-openstack/pull/491 - - protocol: tcp - port_range_min: 22 - port_range_max: 22 - - protocol: tcp - port_range_min: 30000 - port_range_max: 32767 - # allow any traffic from master nodes - - protocol: tcp - port_range_min: 1 - port_range_max: 65535 - remote_mode: 'remote_group_id' - remote_group_id: {get_resource: secgroup_kube_master} - - protocol: udp - port_range_min: 1 - port_range_max: 65535 - remote_mode: 'remote_group_id' - remote_group_id: {get_resource: secgroup_kube_master} - - # allow any traffic between worker nodes - secgroup_rule_tcp_kube_minion: - condition: create_cluster_resources - type: OS::Neutron::SecurityGroupRule - properties: - protocol: tcp - port_range_min: 1 - port_range_max: 65535 - security_group: {get_resource: secgroup_kube_minion} - remote_group: {get_resource: secgroup_kube_minion} - secgroup_rule_udp_kube_minion: - condition: create_cluster_resources - type: OS::Neutron::SecurityGroupRule - properties: - protocol: udp - port_range_min: 1 - port_range_max: 65535 - security_group: {get_resource: secgroup_kube_minion} - remote_group: {get_resource: secgroup_kube_minion} - - ###################################################################### - # - # resources that expose the IPs of either the kube master or a given - # LBaaS pool depending on whether LBaaS is enabled for the cluster. - # - - api_address_lb_switch: - condition: create_cluster_resources - type: Magnum::ApiGatewaySwitcher - properties: - pool_public_ip: {get_attr: [api_lb, floating_address]} - pool_private_ip: {get_attr: [api_lb, address]} - master_public_ip: {get_attr: [kube_masters, resource.0.kube_master_external_ip]} - master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]} - - etcd_address_lb_switch: - condition: create_cluster_resources - type: Magnum::ApiGatewaySwitcher - properties: - pool_private_ip: {get_attr: [etcd_lb, address]} - master_private_ip: {get_attr: [kube_masters, resource.0.kube_master_ip]} - - ###################################################################### - # - # resources that expose the IPs of either floating ip or a given - # fixed ip depending on whether FloatingIP is enabled for the cluster. - # - - api_address_floating_switch: - condition: create_cluster_resources - type: Magnum::FloatingIPAddressSwitcher - properties: - public_ip: {get_attr: [api_address_lb_switch, public_ip]} - private_ip: {get_attr: [api_address_lb_switch, private_ip]} - - ###################################################################### - # - # resources that expose one server group for each master and worker nodes - # separately. - # - - master_nodes_server_group: - condition: master_only - type: OS::Nova::ServerGroup - properties: - policies: [{get_param: nodes_affinity_policy}] - - worker_nodes_server_group: - condition: worker_only - type: OS::Nova::ServerGroup - properties: - policies: [{get_param: nodes_affinity_policy}] - - ###################################################################### - # - # kubernetes masters. This is a resource group that will create - # masters. - # - - kube_masters: - condition: master_only - type: OS::Heat::ResourceGroup - depends_on: - - network - update_policy: - rolling_update: {max_batch_size: {get_param: update_max_batch_size}, pause_time: 30} - properties: - count: {get_param: number_of_masters} - resource_def: - type: kubemaster.yaml - properties: - name: - list_join: - - '-' - - [{ get_param: 'OS::stack_name' }, 'master', '%index%'] - nodegroup_role: {get_param: master_role} - nodegroup_name: {get_param: master_nodegroup_name} - heapster_enabled: {get_param: heapster_enabled} - metrics_server_enabled: {get_param: metrics_server_enabled} - metrics_server_chart_tag: {get_param: metrics_server_chart_tag} - prometheus_monitoring: {get_param: prometheus_monitoring} - api_public_address: {get_attr: [api_lb, floating_address]} - api_private_address: {get_attr: [api_lb, address]} - ssh_key_name: {get_param: ssh_key_name} - server_image: {get_param: master_image} - master_flavor: {get_param: master_flavor} - external_network: {get_param: external_network} - kube_allow_priv: {get_param: kube_allow_priv} - boot_volume_size: {get_param: boot_volume_size} - boot_volume_type: {get_param: boot_volume_type} - etcd_volume_size: {get_param: etcd_volume_size} - etcd_volume_type: {get_param: etcd_volume_type} - docker_volume_size: {get_param: docker_volume_size} - docker_volume_type: {get_param: docker_volume_type} - docker_storage_driver: {get_param: docker_storage_driver} - cgroup_driver: {get_param: cgroup_driver} - network_driver: {get_param: network_driver} - flannel_network_cidr: {get_param: flannel_network_cidr} - flannel_network_subnetlen: {get_param: flannel_network_subnetlen} - flannel_backend: {get_param: flannel_backend} - system_pods_initial_delay: {get_param: system_pods_initial_delay} - system_pods_timeout: {get_param: system_pods_timeout} - portal_network_cidr: {get_param: portal_network_cidr} - admission_control_list: {get_param: admission_control_list} - discovery_url: {get_param: discovery_url} - cluster_uuid: {get_param: cluster_uuid} - magnum_url: {get_param: magnum_url} - traefik_ingress_controller_tag: {get_param: traefik_ingress_controller_tag} - volume_driver: {get_param: volume_driver} - region_name: {get_param: region_name} - fixed_network: {get_attr: [network, fixed_network]} - fixed_network_name: {get_param: fixed_network_name} - fixed_subnet: {get_attr: [network, fixed_subnet]} - fixed_subnet_cidr: {get_param: fixed_subnet_cidr} - api_pool_id: {get_attr: [api_lb, pool_id]} - etcd_pool_id: {get_attr: [etcd_lb, pool_id]} - username: {get_param: username} - password: {get_param: password} - kubernetes_port: {get_param: kubernetes_port} - tls_disabled: {get_param: tls_disabled} - kube_dashboard_enabled: {get_param: kube_dashboard_enabled} - influx_grafana_dashboard_enabled: {get_param: influx_grafana_dashboard_enabled} - verify_ca: {get_param: verify_ca} - secgroup_kube_master_id: {get_resource: secgroup_kube_master} - http_proxy: {get_param: http_proxy} - https_proxy: {get_param: https_proxy} - no_proxy: {get_param: no_proxy} - hyperkube_prefix: {get_param: hyperkube_prefix} - kube_tag: {get_param: master_kube_tag} - cloud_provider_tag: {get_param: cloud_provider_tag} - cloud_provider_enabled: {get_param: cloud_provider_enabled} - kube_version: {get_param: kube_version} - etcd_tag: {get_param: etcd_tag} - coredns_tag: {get_param: coredns_tag} - flannel_tag: {get_param: flannel_tag} - flannel_cni_tag: {get_param: flannel_cni_tag} - kube_dashboard_version: {get_param: kube_dashboard_version} - trustee_user_id: {get_param: trustee_user_id} - trustee_password: {get_param: trustee_password} - trust_id: {get_param: trust_id} - auth_url: {get_param: auth_url} - insecure_registry_url: {get_param: insecure_registry_url} - container_infra_prefix: {get_param: container_infra_prefix} - etcd_lb_vip: {get_attr: [etcd_lb, address]} - dns_service_ip: {get_param: dns_service_ip} - dns_cluster_domain: {get_param: dns_cluster_domain} - openstack_ca: {get_param: openstack_ca} - nodes_server_group_id: {get_resource: master_nodes_server_group} - availability_zone: {get_param: availability_zone} - ca_key: {get_param: ca_key} - cert_manager_api: {get_param: cert_manager_api} - calico_tag: {get_param: calico_tag} - calico_kube_controllers_tag: {get_param: calico_kube_controllers_tag} - calico_ipv4pool: {get_param: calico_ipv4pool} - calico_ipv4pool_ipip: {get_param: calico_ipv4pool_ipip} - pods_network_cidr: {get_param: pods_network_cidr} - ingress_controller: {get_param: ingress_controller} - ingress_controller_role: {get_param: ingress_controller_role} - octavia_ingress_controller_tag: {get_param: octavia_ingress_controller_tag} - kubelet_options: {get_param: kubelet_options} - kubeapi_options: {get_param: kubeapi_options} - kubeproxy_options: {get_param: kubeproxy_options} - kubecontroller_options: {get_param: kubecontroller_options} - kubescheduler_options: {get_param: kubescheduler_options} - octavia_enabled: {get_param: octavia_enabled} - kube_service_account_key: {get_param: kube_service_account_key} - 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} - keystone_auth_enabled: {get_param: keystone_auth_enabled} - k8s_keystone_auth_tag: {get_param: k8s_keystone_auth_tag} - monitoring_enabled: {get_param: monitoring_enabled} - monitoring_retention_days: {get_param: monitoring_retention_days} - monitoring_retention_size: {get_param: monitoring_retention_size} - monitoring_interval_seconds: {get_param: monitoring_interval_seconds} - monitoring_storage_class_name: {get_param: monitoring_storage_class_name} - monitoring_ingress_enabled: {get_param: monitoring_ingress_enabled} - cluster_basic_auth_secret: {get_param: cluster_basic_auth_secret} - cluster_root_domain_name: {get_param: cluster_root_domain_name} - prometheus_operator_chart_tag: {get_param: prometheus_operator_chart_tag} - prometheus_adapter_enabled: {get_param: prometheus_adapter_enabled} - prometheus_adapter_chart_tag: {get_param: prometheus_adapter_chart_tag} - prometheus_adapter_configmap: {get_param: prometheus_adapter_configmap} - project_id: {get_param: project_id} - tiller_enabled: {get_param: tiller_enabled} - tiller_tag: {get_param: tiller_tag} - tiller_namespace: {get_param: tiller_namespace} - helm_client_url: {get_param: helm_client_url} - helm_client_sha256: {get_param: helm_client_sha256} - 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} - auto_healing_enabled: {get_param: auto_healing_enabled} - auto_healing_controller: {get_param: auto_healing_controller} - magnum_auto_healer_tag: {get_param: magnum_auto_healer_tag} - auto_scaling_enabled: {get_param: auto_scaling_enabled} - cinder_csi_enabled: {get_param: cinder_csi_enabled} - cinder_csi_plugin_tag: {get_param: cinder_csi_plugin_tag} - csi_attacher_tag: {get_param: csi_attacher_tag} - csi_provisioner_tag: {get_param: csi_provisioner_tag} - csi_snapshotter_tag: {get_param: csi_snapshotter_tag} - csi_resizer_tag: {get_param: csi_resizer_tag} - csi_node_driver_registrar_tag: {get_param: csi_node_driver_registrar_tag} - draino_tag: {get_param: draino_tag} - autoscaler_tag: {get_param: autoscaler_tag} - min_node_count: {get_param: min_node_count} - max_node_count: {get_param: max_node_count} - npd_enabled: {get_param: npd_enabled} - ostree_remote: {get_param: ostree_remote} - ostree_commit: {get_param: ostree_commit} - use_podman: {get_param: use_podman} - selinux_mode: {get_param: selinux_mode} - container_runtime: {get_param: container_runtime} - containerd_version: {get_param: containerd_version} - containerd_tarball_url: {get_param: containerd_tarball_url} - containerd_tarball_sha256: {get_param: containerd_tarball_sha256} - post_install_manifest_url: {get_param: post_install_manifest_url} - metrics_scraper_tag: {get_param: metrics_scraper_tag} - - kube_cluster_config: - condition: create_cluster_resources - type: OS::Heat::SoftwareConfig - properties: - group: script - config: - list_join: - - "\n" - - - - "#!/bin/bash" - - get_file: ../../common/templates/kubernetes/fragments/kube-apiserver-to-kubelet-role.sh - - get_file: ../../common/templates/kubernetes/fragments/core-dns-service.sh - - if: - - calico_v3_3 - - get_file: ../../common/templates/kubernetes/fragments/calico-service-v3-3-x.sh - - get_file: ../../common/templates/kubernetes/fragments/calico-service.sh - - get_file: ../../common/templates/kubernetes/fragments/flannel-service.sh - - get_file: ../../common/templates/kubernetes/fragments/enable-helm-tiller.sh - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/enable-prometheus-monitoring.sh} - params: - "${GRAFANA_ADMIN_PASSWD}": {get_param: grafana_admin_passwd} - - str_replace: - params: - $enable-ingress-traefik: {get_file: ../../common/templates/kubernetes/fragments/enable-ingress-traefik.sh} - $enable-ingress-octavia: {get_file: ../../common/templates/kubernetes/fragments/enable-ingress-octavia.sh} - template: {get_file: ../../common/templates/kubernetes/fragments/enable-ingress-controller.sh} - - get_file: ../../common/templates/kubernetes/fragments/kube-dashboard-service.sh - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/enable-keystone-auth.sh} - params: - "$KEYSTONE_AUTH_DEFAULT_POLICY": {get_param: keystone_auth_default_policy} - - get_file: ../../common/templates/kubernetes/fragments/enable-auto-healing.sh - - get_file: ../../common/templates/kubernetes/fragments/enable-auto-scaling.sh - - get_file: ../../common/templates/kubernetes/fragments/enable-cinder-csi.sh - # Helm Based Installation Configuration Scripts - - get_file: ../../common/templates/kubernetes/helm/metrics-server.sh - - str_replace: - template: {get_file: ../../common/templates/kubernetes/helm/prometheus-operator.sh} - params: - "${GRAFANA_ADMIN_PASSWD}": {get_param: grafana_admin_passwd} - "${KUBE_MASTERS_PRIVATE}": {get_attr: [kube_masters, kube_master_external_ip]} - - get_file: ../../common/templates/kubernetes/helm/prometheus-adapter.sh - - get_file: ../../common/templates/kubernetes/helm/ingress-nginx.sh - - get_file: ../../common/templates/kubernetes/fragments/install-helm-modules.sh - - kube_cluster_deploy: - condition: create_cluster_resources - type: OS::Heat::SoftwareDeployment - properties: - actions: ['CREATE'] - signal_transport: HEAT_SIGNAL - config: - get_resource: kube_cluster_config - server: - get_attr: [kube_masters, resource.0] - - - ###################################################################### - # - # kubernetes minions. This is an resource group that will initially - # create minions, and needs to be manually scaled. - # - - kube_minions: - condition: worker_only - type: OS::Heat::ResourceGroup - depends_on: - - network - update_policy: - rolling_update: {max_batch_size: {get_param: update_max_batch_size}, pause_time: 30} - properties: - count: {get_param: number_of_minions} - removal_policies: [{resource_list: {get_param: minions_to_remove}}] - resource_def: - type: kubeminion.yaml - properties: - name: - list_join: - - '-' - - [{ get_param: 'OS::stack_name' }, 'node', '%index%'] - prometheus_monitoring: {get_param: prometheus_monitoring} - nodegroup_role: {get_param: worker_role} - nodegroup_name: {get_param: worker_nodegroup_name} - ssh_key_name: {get_param: ssh_key_name} - server_image: {get_param: minion_image} - minion_flavor: {get_param: minion_flavor} - fixed_network: - if: - - create_cluster_resources - - get_attr: [network, fixed_network] - - get_param: fixed_network - fixed_subnet: - if: - - create_cluster_resources - - get_attr: [network, fixed_subnet] - - get_param: fixed_subnet - network_driver: {get_param: network_driver} - flannel_network_cidr: {get_param: flannel_network_cidr} - kube_master_ip: - if: - - create_cluster_resources - - get_attr: [api_address_lb_switch, private_ip] - - get_param: existing_master_private_ip - etcd_server_ip: - if: - - create_cluster_resources - - get_attr: [etcd_address_lb_switch, private_ip] - - get_param: existing_master_private_ip - external_network: {get_param: external_network} - kube_allow_priv: {get_param: kube_allow_priv} - boot_volume_size: {get_param: boot_volume_size} - boot_volume_type: {get_param: boot_volume_type} - docker_volume_size: {get_param: docker_volume_size} - docker_volume_type: {get_param: docker_volume_type} - docker_storage_driver: {get_param: docker_storage_driver} - cgroup_driver: {get_param: cgroup_driver} - wait_condition_timeout: {get_param: wait_condition_timeout} - registry_enabled: {get_param: registry_enabled} - registry_port: {get_param: registry_port} - swift_region: {get_param: swift_region} - registry_container: {get_param: registry_container} - registry_insecure: {get_param: registry_insecure} - registry_chunksize: {get_param: registry_chunksize} - cluster_uuid: {get_param: cluster_uuid} - magnum_url: {get_param: magnum_url} - volume_driver: {get_param: volume_driver} - region_name: {get_param: region_name} - auth_url: {get_param: auth_url} - username: {get_param: username} - password: {get_param: password} - kubernetes_port: {get_param: kubernetes_port} - tls_disabled: {get_param: tls_disabled} - verify_ca: {get_param: verify_ca} - secgroup_kube_minion_id: - if: - - create_cluster_resources - - get_resource: secgroup_kube_minion - - get_param: existing_security_group - http_proxy: {get_param: http_proxy} - https_proxy: {get_param: https_proxy} - no_proxy: {get_param: no_proxy} - hyperkube_prefix: {get_param: hyperkube_prefix} - kube_tag: {get_param: minion_kube_tag} - kube_version: {get_param: kube_version} - trustee_user_id: {get_param: trustee_user_id} - trustee_username: {get_param: trustee_username} - trustee_password: {get_param: trustee_password} - trustee_domain_id: {get_param: trustee_domain_id} - trust_id: {get_param: trust_id} - cloud_provider_enabled: {get_param: cloud_provider_enabled} - insecure_registry_url: {get_param: insecure_registry_url} - container_infra_prefix: {get_param: container_infra_prefix} - dns_service_ip: {get_param: dns_service_ip} - dns_cluster_domain: {get_param: dns_cluster_domain} - openstack_ca: {get_param: openstack_ca} - nodes_server_group_id: {get_resource: worker_nodes_server_group} - availability_zone: {get_param: availability_zone} - pods_network_cidr: {get_param: pods_network_cidr} - 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} - auto_healing_enabled: {get_param: auto_healing_enabled} - npd_enabled: {get_param: npd_enabled} - auto_healing_controller: {get_param: auto_healing_controller} - ostree_remote: {get_param: ostree_remote} - ostree_commit: {get_param: ostree_commit} - use_podman: {get_param: use_podman} - selinux_mode: {get_param: selinux_mode} - container_runtime: {get_param: container_runtime} - containerd_version: {get_param: containerd_version} - containerd_tarball_url: {get_param: containerd_tarball_url} - containerd_tarball_sha256: {get_param: containerd_tarball_sha256} - -outputs: - - api_address: - condition: create_cluster_resources - value: - str_replace: - template: api_ip_address - params: - api_ip_address: {get_attr: [api_address_floating_switch, ip_address]} - description: > - This is the API endpoint of the Kubernetes cluster. Use this to access - the Kubernetes API. - - registry_address: - condition: create_cluster_resources - value: - str_replace: - template: localhost:port - params: - port: {get_param: registry_port} - description: - This is the url of docker registry server where you can store docker - images. - - kube_masters_private: - condition: master_only - value: {get_attr: [kube_masters, kube_master_ip]} - description: > - This is a list of the "private" IP addresses of all the Kubernetes masters. - - kube_masters: - condition: master_only - value: {get_attr: [kube_masters, kube_master_external_ip]} - description: > - This is a list of the "public" IP addresses of all the Kubernetes masters. - Use these IP addresses to log in to the Kubernetes masters via ssh. - - kube_minions_private: - condition: worker_only - value: {get_attr: [kube_minions, kube_minion_ip]} - description: > - This is a list of the "private" IP addresses of all the Kubernetes minions. - - kube_minions: - condition: worker_only - value: {get_attr: [kube_minions, kube_minion_external_ip]} - description: > - This is a list of the "public" IP addresses of all the Kubernetes minions. - Use these IP addresses to log in to the Kubernetes minions via ssh. diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml deleted file mode 100644 index 9ea3c3eb94..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubemaster.yaml +++ /dev/null @@ -1,1079 +0,0 @@ -heat_template_version: queens - -description: > - This is a nested stack that defines a single Kubernetes master, This stack is - included by an ResourceGroup resource in the parent template - (kubecluster.yaml). - -parameters: - - name: - type: string - description: server name - - server_image: - type: string - description: glance image used to boot the server - - master_flavor: - type: string - description: flavor to use when booting the server - - nodegroup_role: - type: string - description: the role of the nodegroup - - nodegroup_name: - type: string - description: the name of the nodegroup where the node belongs - - heapster_enabled: - type: boolean - description: enable/disable the use of heapster - - metrics_server_enabled: - type: boolean - description: enable/disable the use of metrics-server - - metrics_server_chart_tag: - type: string - description: tag of the stable/metrics-server chart to install - - ssh_key_name: - type: string - description: name of ssh key to be provisioned on our server - - external_network: - type: string - description: uuid of a network to use for floating ip addresses - - portal_network_cidr: - type: string - description: > - address range used by kubernetes for service portals - - kube_allow_priv: - type: string - description: > - whether or not kubernetes should permit privileged containers. - constraints: - - allowed_values: ["true", "false"] - - boot_volume_size: - type: number - description: > - size of the cinder boot volume for nodes root volume - default: 0 - - boot_volume_type: - type: string - description: > - type of the cinder boot volume for nodes root volume - - etcd_volume_size: - type: number - description: > - size of a cinder volume to allocate for etcd storage - - etcd_volume_type: - type: string - description: > - type of a cinder volume to allocate for etcd storage - - docker_volume_size: - type: number - description: > - size of a cinder volume to allocate to docker for container/image - storage - - docker_volume_type: - type: string - description: > - type of a cinder volume to allocate to docker for container/image - storage - - docker_storage_driver: - type: string - description: docker storage driver name - default: "devicemapper" - - cgroup_driver: - type: string - description: > - cgroup driver name that kubelet should use, ideally the same as - the docker cgroup driver. - default: "cgroupfs" - - volume_driver: - type: string - description: volume driver to use for container storage - - region_name: - type: string - description: A logically separate section of the cluster - - flannel_network_cidr: - type: string - description: network range for flannel overlay network - - flannel_network_subnetlen: - type: number - description: size of subnet assigned to each master - - flannel_backend: - type: string - description: > - specify the backend for flannel, default udp backend - constraints: - - allowed_values: ["udp", "vxlan", "host-gw"] - - system_pods_initial_delay: - type: number - description: > - health check, time to wait for system pods (podmaster, scheduler) to boot - (in seconds) - default: 30 - - system_pods_timeout: - type: number - description: > - health check, timeout for system pods (podmaster, scheduler) to answer. - (in seconds) - default: 5 - - admission_control_list: - type: string - description: > - List of admission control plugins to activate - - discovery_url: - type: string - description: > - Discovery URL used for bootstrapping the etcd cluster. - - tls_disabled: - type: boolean - description: whether or not to enable TLS - - traefik_ingress_controller_tag: - type: string - description: tag of the traefik containers to be used. - - kube_dashboard_enabled: - type: boolean - description: whether or not to disable kubernetes dashboard - - influx_grafana_dashboard_enabled: - type: boolean - description: Enable influxdb with grafana dashboard for data from heapster - - verify_ca: - type: boolean - description: whether or not to validate certificate authority - - kubernetes_port: - type: number - description: > - The port which are used by kube-apiserver to provide Kubernetes - service. - - cluster_uuid: - type: string - description: identifier for the cluster this template is generating - - magnum_url: - type: string - description: endpoint to retrieve TLS certs from - - prometheus_monitoring: - type: boolean - description: > - whether or not to have prometheus and grafana deployed - - api_public_address: - type: string - description: Public IP address of the Kubernetes master server. - default: "" - - api_private_address: - type: string - description: Private IP address of the Kubernetes master server. - default: "" - - fixed_network: - type: string - description: Network from which to allocate fixed addresses. - - fixed_network_name: - type: string - description: Network from which to allocate fixed addresses. - - fixed_subnet: - type: string - description: Subnet from which to allocate fixed addresses. - - fixed_subnet_cidr: - type: string - description: network range for fixed ip network - - network_driver: - type: string - description: network driver to use for instantiating container networks - - secgroup_kube_master_id: - type: string - description: ID of the security group for kubernetes master. - - api_pool_id: - type: string - description: ID of the load balancer pool of k8s API server. - - etcd_pool_id: - type: string - description: ID of the load balancer pool of etcd server. - - auth_url: - type: string - description: > - url for kubernetes to authenticate - - username: - type: string - description: > - user account - - password: - type: string - description: > - user password - - http_proxy: - type: string - description: http proxy address for docker - - https_proxy: - type: string - description: https proxy address for docker - - no_proxy: - type: string - description: no proxies for docker - - hyperkube_prefix: - type: string - description: prefix to use for hyperkube images - - kube_tag: - type: string - description: tag of the k8s containers used to provision the kubernetes cluster - - cloud_provider_tag: - type: string - description: - tag of the kubernetes/cloud-provider-openstack - https://hub.docker.com/r/k8scloudprovider/openstack-cloud-controller-manager/tags/ - - cloud_provider_enabled: - type: boolean - description: Enable or disable the openstack kubernetes cloud provider - - etcd_tag: - type: string - description: tag of the etcd system container - - coredns_tag: - type: string - description: tag of the coredns container - - flannel_tag: - type: string - description: tag of the flannel system containers - - flannel_cni_tag: - type: string - description: tag of the flannel cni container - - kube_version: - type: string - description: version of kubernetes used for kubernetes cluster - - kube_dashboard_version: - type: string - description: version of kubernetes dashboard used for kubernetes cluster - - trustee_user_id: - type: string - description: user id of the trustee - - trustee_password: - type: string - description: password of the trustee - hidden: true - - trust_id: - type: string - description: id of the trust which is used by the trustee - hidden: true - - insecure_registry_url: - type: string - description: insecure registry url - - container_infra_prefix: - type: string - description: > - prefix of container images used in the cluster, kubernetes components, - kubernetes-dashboard, coredns etc - - etcd_lb_vip: - type: string - description: > - etcd lb vip private used to generate certs on master. - default: "" - - dns_service_ip: - type: string - description: > - address used by Kubernetes DNS service - - dns_cluster_domain: - type: string - description: > - domain name for cluster DNS - - openstack_ca: - type: string - description: The OpenStack CA certificate to install on the node. - - nodes_server_group_id: - type: string - description: ID of the server group for kubernetes cluster nodes. - - availability_zone: - type: string - description: > - availability zone for master and nodes - default: "" - - ca_key: - type: string - description: key of internal ca for the kube certificate api manager - hidden: true - - cert_manager_api: - type: boolean - description: true if the kubernetes cert api manager should be enabled - default: false - - calico_tag: - type: string - description: tag of the calico containers used to provision the calico node - - calico_kube_controllers_tag: - type: string - description: tag of the kube_controllers used to provision the calico node - - calico_ipv4pool: - type: string - description: Configure the IP pool from which Pod IPs will be chosen - - calico_ipv4pool_ipip: - type: string - description: IPIP Mode to use for the IPv4 POOL created at start up - - pods_network_cidr: - type: string - description: Configure the IP pool/range from which pod IPs will be chosen - - ingress_controller: - type: string - description: > - ingress controller backend to use - - ingress_controller_role: - type: string - description: > - node role where the ingress controller should run - - octavia_ingress_controller_tag: - type: string - description: Octavia ingress controller docker image tag. - - kubelet_options: - type: string - description: > - additional options to be passed to the kubelet - - kubeapi_options: - type: string - description: > - additional options to be passed to the api - - kubecontroller_options: - type: string - description: > - additional options to be passed to the controller manager - - kubeproxy_options: - type: string - description: > - additional options to be passed to the kube proxy - - kubescheduler_options: - type: string - description: > - additional options to be passed to the scheduler - - octavia_enabled: - type: boolean - description: > - whether or not to use Octavia for LoadBalancer type service. - default: False - - kube_service_account_key: - type: string - hidden: true - description: > - The signed cert will be used to verify the k8s service account tokens - during authentication. - - kube_service_account_private_key: - type: string - hidden: true - description: > - The private key will be used to sign generated k8s service account - tokens. - - prometheus_tag: - type: string - description: tag of prometheus container - - grafana_tag: - type: string - description: tag of grafana container - - heat_container_agent_tag: - type: string - description: tag of the heat_container_agent system container - - keystone_auth_enabled: - type: boolean - description: > - true if the keystone authN and authZ should be enabled - default: - false - - k8s_keystone_auth_tag: - type: string - description: tag of the k8s_keystone_auth container - - monitoring_enabled: - type: boolean - description: Enable or disable prometheus-operator monitoring solution. - - monitoring_retention_days: - type: number - description: The number of time (in days) that prometheus metrics should be kept. - - monitoring_retention_size: - type: number - description: > - The maximum memory (in Gi) allowed to be used by prometheus server to store metrics. - - monitoring_interval_seconds: - type: number - description: > - The time interval (in seconds) between consecutive metric scrapings. - - monitoring_storage_class_name: - type: string - description: The kubernetes storage class name to use for the prometheus pvc. - - monitoring_ingress_enabled: - type: boolean - description: Enable/disable configuration of ingresses for the monitoring services. - - cluster_basic_auth_secret: - type: string - description: > - The kubernetes secret name to use for the proxy basic auth username and password. - - cluster_root_domain_name: - type: string - description: > - The root domain name to use for the cluster automatically set up applications. - - prometheus_operator_chart_tag: - type: string - description: The stable/prometheus-operator chart version to use. - - prometheus_adapter_enabled: - type: boolean - description: Enable or disable prometheus-adapter custom metrics. - - prometheus_adapter_chart_tag: - type: string - description: The stable/prometheus-adapter chart version to use. - - prometheus_adapter_configmap: - type: string - description: The prometheus adapter rules ConfigMap name to use as overwrite. - - project_id: - type: string - description: > - project id of current project - - tiller_enabled: - type: string - description: Whether to enable tiller or not - - tiller_tag: - type: string - description: tag of tiller container - - tiller_namespace: - type: string - description: namespace where tiller will be installed - - helm_client_url: - type: string - description: url of helm client tarball - - helm_client_sha256: - type: string - description: sha256 of helm client tarball - - helm_client_tag: - type: string - description: > - release tag of helm client - https://github.com/helm/helm/releases - - auto_healing_enabled: - type: boolean - description: > - true if the auto healing feature should be enabled - - auto_healing_controller: - type: string - description: > - The service to be deployed for auto-healing. - default: "draino" - - magnum_auto_healer_tag: - type: string - description: tag of the magnum-auto-healer service. - default: "v1.15.0" - - auto_scaling_enabled: - type: boolean - description: > - true if the auto scaling feature should be enabled - - cinder_csi_enabled: - type: boolean - description: > - true if the cinder csi feature should be enabled - - cinder_csi_plugin_tag: - type: string - description: tag of cinder csi plugin - - csi_attacher_tag: - type: string - description: tag of csi attacher - - csi_provisioner_tag: - type: string - description: tag of csi provisioner - - csi_snapshotter_tag: - type: string - description: tag of csi snapshotter - - csi_resizer_tag: - type: string - description: tag of csi resizer - - csi_node_driver_registrar_tag: - type: string - description: tag of csi node driver registrar - - node_problem_detector_tag: - type: string - description: tag of the node problem detector container - - nginx_ingress_controller_tag: - type: string - description: nginx ingress controller docker image tag - - nginx_ingress_controller_chart_tag: - type: string - description: nginx ingress controller helm chart tag - - draino_tag: - type: string - description: tag of the draino container - - autoscaler_tag: - type: string - description: tag of the autoscaler container - - min_node_count: - type: number - description: > - minimum node count of cluster workers when doing scale down - - max_node_count: - type: number - description: > - maximum node count of cluster workers when doing scale up - - npd_enabled: - type: boolean - description: > - true if the npd service should be launched - default: - true - - ostree_remote: - type: string - description: The ostree remote branch to upgrade - - ostree_commit: - type: string - description: The ostree commit to deploy - - use_podman: - type: boolean - description: > - if true, run system containers for kubernetes, etcd and heat-agent - - selinux_mode: - type: string - description: > - Choose SELinux mode - - container_runtime: - type: string - description: The container runtime to install - - containerd_version: - type: string - description: The containerd version to download from https://storage.googleapis.com/cri-containerd-release/ - - containerd_tarball_url: - type: string - description: Url location of the containerd tarball. - - containerd_tarball_sha256: - type: string - description: sha256 of the target containerd tarball. - - post_install_manifest_url: - type: string - description: > - Post install manifest url to setup some cloud provider/vendor - specific configs - - metrics_scraper_tag: - type: string - description: > - Tag of metrics-scraper for kubernetes dashboard. - -conditions: - - image_based: {equals: [{get_param: boot_volume_size}, 0]} - volume_based: - not: - equals: - - get_param: boot_volume_size - - 0 - -resources: - ###################################################################### - # - # resource that exposes the IPs of either the kube master or the API - # LBaaS pool depending on whether LBaaS is enabled for the cluster. - # - - api_address_switch: - type: Magnum::ApiGatewaySwitcher - properties: - pool_public_ip: {get_param: api_public_address} - pool_private_ip: {get_param: api_private_address} - master_public_ip: {get_attr: [kube_master_floating, floating_ip_address]} - master_private_ip: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} - - ###################################################################### - # - # software configs. these are components that are combined into - # a multipart MIME user-data archive. - # - - agent_config: - type: OS::Heat::SoftwareConfig - properties: - group: ungrouped - config: - list_join: - - "\n" - - - - str_replace: - template: {get_file: ../../common/templates/fragments/atomic-install-openstack-ca.sh} - params: - $OPENSTACK_CA: {get_param: openstack_ca} - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/start-container-agent.sh} - params: - $CONTAINER_INFRA_PREFIX: {get_param: container_infra_prefix} - $HEAT_CONTAINER_AGENT_TAG: {get_param: heat_container_agent_tag} - $USE_PODMAN: {get_param: use_podman} - $HTTP_PROXY: {get_param: http_proxy} - $HTTPS_PROXY: {get_param: https_proxy} - $NO_PROXY: {get_param: no_proxy} - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/disable-selinux.sh} - params: - $SELINUX_MODE: {get_param: selinux_mode} - - master_config: - type: OS::Heat::SoftwareConfig - properties: - group: script - config: - list_join: - - "\n" - - - - "#!/bin/bash" - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/write-heat-params-master.sh} - params: - "$INSTANCE_NAME": {get_param: name} - "$HEAPSTER_ENABLED": {get_param: heapster_enabled} - "$METRICS_SERVER_ENABLED": {get_param: metrics_server_enabled} - "$METRICS_SERVER_CHART_TAG": {get_param: metrics_server_chart_tag} - "$PROMETHEUS_MONITORING": {get_param: prometheus_monitoring} - "$KUBE_API_PUBLIC_ADDRESS": {get_attr: [api_address_switch, public_ip]} - "$KUBE_API_PRIVATE_ADDRESS": {get_attr: [api_address_switch, private_ip]} - "$KUBE_API_PORT": {get_param: kubernetes_port} - "$KUBE_NODE_PUBLIC_IP": {get_attr: [kube_master_floating, floating_ip_address]} - "$KUBE_NODE_IP": {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} - "$KUBE_ALLOW_PRIV": {get_param: kube_allow_priv} - "$ETCD_VOLUME": {get_resource: etcd_volume} - "$ETCD_VOLUME_SIZE": {get_param: etcd_volume_size} - "$DOCKER_VOLUME": {get_resource: docker_volume} - "$DOCKER_VOLUME_SIZE": {get_param: docker_volume_size} - "$DOCKER_STORAGE_DRIVER": {get_param: docker_storage_driver} - "$CGROUP_DRIVER": {get_param: cgroup_driver} - "$NETWORK_DRIVER": {get_param: network_driver} - "$FLANNEL_NETWORK_CIDR": {get_param: flannel_network_cidr} - "$FLANNEL_NETWORK_SUBNETLEN": {get_param: flannel_network_subnetlen} - "$FLANNEL_BACKEND": {get_param: flannel_backend} - "$SYSTEM_PODS_INITIAL_DELAY": {get_param: system_pods_initial_delay} - "$SYSTEM_PODS_TIMEOUT": {get_param: system_pods_timeout} - "$PODS_NETWORK_CIDR": {get_param: pods_network_cidr} - "$PORTAL_NETWORK_CIDR": {get_param: portal_network_cidr} - "$ADMISSION_CONTROL_LIST": {get_param: admission_control_list} - "$ETCD_DISCOVERY_URL": {get_param: discovery_url} - "$AUTH_URL": {get_param: auth_url} - "$USERNAME": {get_param: username} - "$PASSWORD": {get_param: password} - "$CLUSTER_NETWORK": {get_param: fixed_network} - "$CLUSTER_NETWORK_NAME": {get_param: fixed_network_name} - "$CLUSTER_SUBNET": {get_param: fixed_subnet} - "$CLUSTER_SUBNET_CIDR": {get_param: fixed_subnet_cidr} - "$TLS_DISABLED": {get_param: tls_disabled} - "$TRAEFIK_INGRESS_CONTROLLER_TAG": {get_param: traefik_ingress_controller_tag} - "$KUBE_DASHBOARD_ENABLED": {get_param: kube_dashboard_enabled} - "$INFLUX_GRAFANA_DASHBOARD_ENABLED": {get_param: influx_grafana_dashboard_enabled} - "$VERIFY_CA": {get_param: verify_ca} - "$CLUSTER_UUID": {get_param: cluster_uuid} - "$MAGNUM_URL": {get_param: magnum_url} - "$VOLUME_DRIVER": {get_param: volume_driver} - "$REGION_NAME": {get_param: region_name} - "$HTTP_PROXY": {get_param: http_proxy} - "$HTTPS_PROXY": {get_param: https_proxy} - "$NO_PROXY": {get_param: no_proxy} - "$HYPERKUBE_PREFIX": {get_param: hyperkube_prefix} - "$KUBE_TAG": {get_param: kube_tag} - "$CLOUD_PROVIDER_TAG": {get_param: cloud_provider_tag} - "$CLOUD_PROVIDER_ENABLED": {get_param: cloud_provider_enabled} - "$ETCD_TAG": {get_param: etcd_tag} - "$COREDNS_TAG": {get_param: coredns_tag} - "$FLANNEL_TAG": {get_param: flannel_tag} - "$FLANNEL_CNI_TAG": {get_param: flannel_cni_tag} - "$KUBE_VERSION": {get_param: kube_version} - "$KUBE_DASHBOARD_VERSION": {get_param: kube_dashboard_version} - "$TRUSTEE_USER_ID": {get_param: trustee_user_id} - "$TRUSTEE_PASSWORD": {get_param: trustee_password} - "$TRUST_ID": {get_param: trust_id} - "$INSECURE_REGISTRY_URL": {get_param: insecure_registry_url} - "$CONTAINER_INFRA_PREFIX": {get_param: container_infra_prefix} - "$ETCD_LB_VIP": {get_param: etcd_lb_vip} - "$DNS_SERVICE_IP": {get_param: dns_service_ip} - "$DNS_CLUSTER_DOMAIN": {get_param: dns_cluster_domain} - "$CERT_MANAGER_API": {get_param: cert_manager_api} - "$CA_KEY": {get_param: ca_key} - "$CALICO_TAG": {get_param: calico_tag} - "$CALICO_KUBE_CONTROLLERS_TAG": {get_param: calico_kube_controllers_tag} - "$CALICO_IPV4POOL": {get_param: calico_ipv4pool} - "$CALICO_IPV4POOL_IPIP": {get_param: calico_ipv4pool_ipip} - "$INGRESS_CONTROLLER": {get_param: ingress_controller} - "$INGRESS_CONTROLLER_ROLE": {get_param: ingress_controller_role} - "$OCTAVIA_INGRESS_CONTROLLER_TAG": {get_param: octavia_ingress_controller_tag} - "$KUBELET_OPTIONS": {get_param: kubelet_options} - "$KUBEAPI_OPTIONS": {get_param: kubeapi_options} - "$KUBECONTROLLER_OPTIONS": {get_param: kubecontroller_options} - "$KUBEPROXY_OPTIONS": {get_param: kubeproxy_options} - "$KUBESCHEDULER_OPTIONS": {get_param: kubescheduler_options} - "$OCTAVIA_ENABLED": {get_param: octavia_enabled} - "$KUBE_SERVICE_ACCOUNT_KEY": {get_param: kube_service_account_key} - "$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} - "$KEYSTONE_AUTH_ENABLED": {get_param: keystone_auth_enabled} - "$K8S_KEYSTONE_AUTH_TAG": {get_param: k8s_keystone_auth_tag} - "$MONITORING_ENABLED": {get_param: monitoring_enabled} - "$MONITORING_RETENTION_DAYS": {get_param: monitoring_retention_days} - "$MONITORING_RETENTION_SIZE": {get_param: monitoring_retention_size} - "$MONITORING_INTERVAL_SECONDS": {get_param: monitoring_interval_seconds} - "$MONITORING_STORAGE_CLASS_NAME": {get_param: monitoring_storage_class_name} - "$MONITORING_INGRESS_ENABLED": {get_param: monitoring_ingress_enabled} - "$CLUSTER_BASIC_AUTH_SECRET": {get_param: cluster_basic_auth_secret} - "$CLUSTER_ROOT_DOMAIN_NAME": {get_param: cluster_root_domain_name} - "$PROMETHEUS_OPERATOR_CHART_TAG": {get_param: prometheus_operator_chart_tag} - "$PROMETHEUS_ADAPTER_ENABLED": {get_param: prometheus_adapter_enabled} - "$PROMETHEUS_ADAPTER_CHART_TAG": {get_param: prometheus_adapter_chart_tag} - "$PROMETHEUS_ADAPTER_CONFIGMAP": {get_param: prometheus_adapter_configmap} - "$PROJECT_ID": {get_param: project_id} - "$EXTERNAL_NETWORK_ID": {get_param: external_network} - "$TILLER_ENABLED": {get_param: tiller_enabled} - "$TILLER_TAG": {get_param: tiller_tag} - "$TILLER_NAMESPACE": {get_param: tiller_namespace} - "$HELM_CLIENT_URL": {get_param: helm_client_url} - "$HELM_CLIENT_SHA256": {get_param: helm_client_sha256} - "$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} - "$AUTO_HEALING_ENABLED": {get_param: auto_healing_enabled} - "$AUTO_HEALING_CONTROLLER": {get_param: auto_healing_controller} - "$MAGNUM_AUTO_HEALER_TAG": {get_param: magnum_auto_healer_tag} - "$AUTO_SCALING_ENABLED": {get_param: auto_scaling_enabled} - "$CINDER_CSI_ENABLED": {get_param: cinder_csi_enabled} - "$CINDER_CSI_PLUGIN_TAG": {get_param: cinder_csi_plugin_tag} - "$CSI_ATTACHER_TAG": {get_param: csi_attacher_tag} - "$CSI_PROVISIONER_TAG": {get_param: csi_provisioner_tag} - "$CSI_SNAPSHOTTER_TAG": {get_param: csi_snapshotter_tag} - "$CSI_RESIZER_TAG": {get_param: csi_resizer_tag} - "$CSI_NODE_DRIVER_REGISTRAR_TAG": {get_param: csi_node_driver_registrar_tag} - "$DRAINO_TAG": {get_param: draino_tag} - "$AUTOSCALER_TAG": {get_param: autoscaler_tag} - "$MIN_NODE_COUNT": {get_param: min_node_count} - "$MAX_NODE_COUNT": {get_param: max_node_count} - "$NPD_ENABLED": {get_param: npd_enabled} - "$NODEGROUP_ROLE": {get_param: nodegroup_role} - "$NODEGROUP_NAME": {get_param: nodegroup_name} - "$USE_PODMAN": {get_param: use_podman} - "$CONTAINER_RUNTIME": {get_param: container_runtime} - "$CONTAINERD_VERSION": {get_param: containerd_version} - "$CONTAINERD_TARBALL_URL": {get_param: containerd_tarball_url} - "$CONTAINERD_TARBALL_SHA256": {get_param: containerd_tarball_sha256} - "$POST_INSTALL_MANIFEST_URL": {get_param: post_install_manifest_url} - "$METRICS_SCRAPER_TAG": {get_param: metrics_scraper_tag} - - get_file: ../../common/templates/kubernetes/fragments/install-cri.sh - - get_file: ../../common/templates/kubernetes/fragments/install-clients.sh - - get_file: ../../common/templates/kubernetes/fragments/make-cert.sh - - get_file: ../../common/templates/kubernetes/fragments/make-cert-client.sh - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/enable-cert-api-manager.sh} - params: - "$CA_KEY": {get_param: ca_key} - - get_file: ../../common/templates/kubernetes/fragments/configure-etcd.sh - - get_file: ../../common/templates/kubernetes/fragments/write-kube-os-config.sh - - get_file: ../../common/templates/kubernetes/fragments/configure-kubernetes-master.sh - - str_replace: - template: {get_file: ../../common/templates/fragments/configure-docker-storage.sh} - params: - $configure_docker_storage_driver: {get_file: ../../common/templates/fragments/configure_docker_storage_driver_atomic.sh} - - get_file: ../../common/templates/kubernetes/fragments/enable-services-master.sh - - get_file: ../../common/templates/kubernetes/fragments/add-proxy.sh - - master_config_deployment: - type: OS::Heat::SoftwareDeployment - properties: - signal_transport: HEAT_SIGNAL - config: {get_resource: master_config} - server: {if: ["volume_based", {get_resource: kube-master-bfv}, {get_resource: kube-master}]} - actions: ['CREATE'] - - ###################################################################### - # - # a single kubernetes master. - # - - kube_node_volume: - type: OS::Cinder::Volume - condition: volume_based - properties: - image: {get_param: server_image} - size: {get_param: boot_volume_size} - volume_type: {get_param: boot_volume_type} - availability_zone: {get_param: availability_zone} - - # do NOT use "_" (underscore) in the Nova server name - # it creates a mismatch between the generated Nova name and its hostname - # which can lead to weird problems - kube-master: - type: OS::Nova::Server - condition: image_based - properties: - name: {get_param: name} - image: {get_param: server_image} - flavor: {get_param: master_flavor} - key_name: {get_param: ssh_key_name} - user_data_format: SOFTWARE_CONFIG - software_config_transport: POLL_SERVER_HEAT - user_data: {get_resource: agent_config} - networks: - - port: {get_resource: kube_master_eth0} - scheduler_hints: { group: { get_param: nodes_server_group_id }} - availability_zone: {get_param: availability_zone} - - kube-master-bfv: - type: OS::Nova::Server - condition: volume_based - properties: - name: {get_param: name} - flavor: {get_param: master_flavor} - key_name: {get_param: ssh_key_name} - user_data_format: SOFTWARE_CONFIG - software_config_transport: POLL_SERVER_HEAT - user_data: {get_resource: agent_config} - networks: - - port: {get_resource: kube_master_eth0} - scheduler_hints: { group: { get_param: nodes_server_group_id }} - availability_zone: {get_param: availability_zone} - block_device_mapping_v2: - - boot_index: 0 - volume_id: {get_resource: kube_node_volume} - - kube_master_eth0: - type: OS::Neutron::Port - properties: - network: {get_param: fixed_network} - security_groups: - - {get_param: secgroup_kube_master_id} - fixed_ips: - - subnet: {get_param: fixed_subnet} - allowed_address_pairs: - - ip_address: {get_param: pods_network_cidr} - replacement_policy: AUTO - - kube_master_floating: - type: Magnum::Optional::KubeMaster::Neutron::FloatingIP - properties: - floating_network: {get_param: external_network} - port_id: {get_resource: kube_master_eth0} - depends_on: kube-master - - api_pool_member: - type: Magnum::Optional::Neutron::LBaaS::PoolMember - properties: - pool: {get_param: api_pool_id} - address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} - subnet: { get_param: fixed_subnet } - protocol_port: {get_param: kubernetes_port} - - etcd_pool_member: - type: Magnum::Optional::Neutron::LBaaS::PoolMember - properties: - pool: {get_param: etcd_pool_id} - address: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} - subnet: { get_param: fixed_subnet } - protocol_port: 2379 - - ###################################################################### - # - # etcd storage. This allocates a cinder volume and attaches it - # to the master. - # - - etcd_volume: - type: Magnum::Optional::Etcd::Volume - properties: - size: {get_param: etcd_volume_size} - volume_type: {get_param: etcd_volume_type} - availability_zone: {get_param: availability_zone} - - etcd_volume_attach: - type: Magnum::Optional::Etcd::VolumeAttachment - properties: - instance_uuid: {if: ["volume_based", {get_resource: kube-master-bfv}, {get_resource: kube-master}]} - volume_id: {get_resource: etcd_volume} - mountpoint: /dev/vdc - - ###################################################################### - # - # docker storage. This allocates a cinder volume and attaches it - # to the minion. - # - - docker_volume: - type: Magnum::Optional::Cinder::Volume - properties: - size: {get_param: docker_volume_size} - volume_type: {get_param: docker_volume_type} - availability_zone: {get_param: availability_zone} - - docker_volume_attach: - type: Magnum::Optional::Cinder::VolumeAttachment - properties: - instance_uuid: {if: ["volume_based", {get_resource: kube-master-bfv}, {get_resource: kube-master}]} - volume_id: {get_resource: docker_volume} - mountpoint: /dev/vdb - - upgrade_kubernetes: - type: OS::Heat::SoftwareConfig - properties: - group: script - inputs: - - name: kube_tag_input - - name: ostree_remote_input - - name: ostree_commit_input - config: - list_join: - - "\n" - - - - "#!/bin/bash" - - get_file: ../../common/templates/kubernetes/fragments/upgrade-kubernetes.sh - - upgrade_kubernetes_deployment: - type: OS::Heat::SoftwareDeployment - properties: - signal_transport: HEAT_SIGNAL - config: {get_resource: upgrade_kubernetes} - server: {if: ["volume_based", {get_resource: kube-master-bfv}, {get_resource: kube-master}]} - actions: ['UPDATE'] - input_values: - kube_tag_input: {get_param: kube_tag} - ostree_remote_input: {get_param: ostree_remote} - ostree_commit_input: {get_param: ostree_commit} - -outputs: - - OS::stack_id: - value: {if: ["volume_based", {get_resource: kube-master-bfv}, {get_resource: kube-master}]} - - kube_master_ip: - value: {get_attr: [kube_master_eth0, fixed_ips, 0, ip_address]} - description: > - This is the "private" IP address of the Kubernetes master node. - - kube_master_external_ip: - value: {get_attr: [kube_master_floating, floating_ip_address]} - description: > - This is the "public" IP address of the Kubernetes master node. diff --git a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml b/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml deleted file mode 100644 index 1bc512a38e..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/templates/kubeminion.yaml +++ /dev/null @@ -1,636 +0,0 @@ -heat_template_version: queens - -description: > - This is a nested stack that defines a single Kubernetes minion, This stack is - included by an AutoScalingGroup resource in the parent template - (kubecluster.yaml). - -parameters: - - name: - type: string - description: server name - - server_image: - type: string - description: glance image used to boot the server - - minion_flavor: - type: string - description: flavor to use when booting the server - - nodegroup_role: - type: string - description: the role of the nodegroup - - nodegroup_name: - type: string - description: the name of the nodegroup where the node belongs - - ssh_key_name: - type: string - description: name of ssh key to be provisioned on our server - - external_network: - type: string - description: uuid/name of a network to use for floating ip addresses - - kube_allow_priv: - type: string - description: > - whether or not kubernetes should permit privileged containers. - constraints: - - allowed_values: ["true", "false"] - - boot_volume_size: - type: number - description: > - size of the cinder boot volume - - boot_volume_type: - type: string - description: > - type of the cinder boot volume - - docker_volume_size: - type: number - description: > - size of a cinder volume to allocate to docker for container/image - storage - - docker_volume_type: - type: string - description: > - type of a cinder volume to allocate to docker for container/image - storage - - docker_storage_driver: - type: string - description: docker storage driver name - default: "devicemapper" - - cgroup_driver: - type: string - description: > - cgroup driver name that kubelet should use, ideally the same as - the docker cgroup driver. - default: "cgroupfs" - - tls_disabled: - type: boolean - description: whether or not to enable TLS - - verify_ca: - type: boolean - description: whether or not to validate certificate authority - - kubernetes_port: - type: number - description: > - The port which are used by kube-apiserver to provide Kubernetes - service. - - cluster_uuid: - type: string - description: identifier for the cluster this template is generating - - magnum_url: - type: string - description: endpoint to retrieve TLS certs from - - prometheus_monitoring: - type: boolean - description: > - whether or not to have the node-exporter running on the node - - kube_master_ip: - type: string - description: IP address of the Kubernetes master server. - - etcd_server_ip: - type: string - description: IP address of the Etcd server. - - fixed_network: - type: string - description: Network from which to allocate fixed addresses. - - fixed_subnet: - type: string - description: Subnet from which to allocate fixed addresses. - - network_driver: - type: string - description: network driver to use for instantiating container networks - - flannel_network_cidr: - type: string - description: network range for flannel overlay network - - wait_condition_timeout: - type: number - description : > - timeout for the Wait Conditions - - registry_enabled: - type: boolean - description: > - Indicates whether the docker registry is enabled. - - registry_port: - type: number - description: port of registry service - - swift_region: - type: string - description: region of swift service - - registry_container: - type: string - description: > - name of swift container which docker registry stores images in - - registry_insecure: - type: boolean - description: > - indicates whether to skip TLS verification between registry and backend storage - - registry_chunksize: - type: number - description: > - size fo the data segments for the swift dynamic large objects - - secgroup_kube_minion_id: - type: string - description: ID of the security group for kubernetes minion. - - volume_driver: - type: string - description: volume driver to use for container storage - - region_name: - type: string - description: A logically separate section of the cluster - - username: - type: string - description: > - user account - - password: - type: string - description: > - user password, not set in current implementation, only used to - fill in for Kubernetes config file - hidden: true - - http_proxy: - type: string - description: http proxy address for docker - - https_proxy: - type: string - description: https proxy address for docker - - no_proxy: - type: string - description: no proxies for docker - - hyperkube_prefix: - type: string - description: prefix to use for hyperkube images - - kube_tag: - type: string - description: tag of the k8s containers used to provision the kubernetes cluster - - kube_version: - type: string - description: version of kubernetes used for kubernetes cluster - - trustee_domain_id: - type: string - description: domain id of the trustee - - trustee_user_id: - type: string - description: user id of the trustee - - trustee_username: - type: string - description: username of the trustee - - trustee_password: - type: string - description: password of the trustee - hidden: true - - trust_id: - type: string - description: id of the trust which is used by the trustee - hidden: true - - auth_url: - type: string - description: > - url for keystone, must be v2 since k8s backend only support v2 - at this point - - insecure_registry_url: - type: string - description: insecure registry url - - container_infra_prefix: - type: string - description: > - prefix of container images used in the cluster, kubernetes components, - kubernetes-dashboard, coredns etc - - dns_service_ip: - type: string - description: > - address used by Kubernetes DNS service - - dns_cluster_domain: - type: string - description: > - domain name for cluster DNS - - openstack_ca: - type: string - description: The OpenStack CA certificate to install on the node. - - nodes_server_group_id: - type: string - description: ID of the server group for kubernetes cluster nodes. - - availability_zone: - type: string - description: > - availability zone for master and nodes - default: "" - - pods_network_cidr: - type: string - description: Configure the IP pool/range from which pod IPs will be chosen - - kubelet_options: - type: string - description: > - additional options to be passed to the kubelet - - kubeproxy_options: - type: string - description: > - additional options to be passed to the kube proxy - - octavia_enabled: - type: boolean - description: > - whether or not to use Octavia for LoadBalancer type service. - default: False - - cloud_provider_enabled: - 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 - - auto_healing_enabled: - type: boolean - description: > - true if the auto healing feature should be enabled - - auto_healing_controller: - type: string - description: > - The service to be deployed for auto-healing. - default: "draino" - - npd_enabled: - type: boolean - description: > - true if the npd service should be launched - default: - true - - ostree_remote: - type: string - description: The ostree remote branch to upgrade - default: '' - - ostree_commit: - type: string - description: The ostree commit to deploy - default: '' - - use_podman: - type: boolean - description: > - if true, run system containers for kubernetes, etcd and heat-agent - - selinux_mode: - type: string - description: > - Choose SELinux mode - - container_runtime: - type: string - description: The container runtime to install - - containerd_version: - type: string - description: The containerd version to download from https://storage.googleapis.com/cri-containerd-release/ - - containerd_tarball_url: - type: string - description: Url location of the containerd tarball. - - containerd_tarball_sha256: - type: string - description: sha256 of the target containerd tarball. - -conditions: - - image_based: {equals: [{get_param: boot_volume_size}, 0]} - volume_based: - not: - equals: - - get_param: boot_volume_size - - 0 - - -resources: - - agent_config: - type: OS::Heat::SoftwareConfig - properties: - group: ungrouped - config: - list_join: - - "\n" - - - - str_replace: - template: {get_file: ../../common/templates/fragments/atomic-install-openstack-ca.sh} - params: - $OPENSTACK_CA: {get_param: openstack_ca} - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/start-container-agent.sh} - params: - $CONTAINER_INFRA_PREFIX: {get_param: container_infra_prefix} - $HEAT_CONTAINER_AGENT_TAG: {get_param: heat_container_agent_tag} - $USE_PODMAN: {get_param: use_podman} - $HTTP_PROXY: {get_param: http_proxy} - $HTTPS_PROXY: {get_param: https_proxy} - $NO_PROXY: {get_param: no_proxy} - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/disable-selinux.sh} - params: - $SELINUX_MODE: {get_param: selinux_mode} - - ###################################################################### - # - # software configs. these are components that are combined into - # a multipart MIME user-data archive. - # - - node_config: - type: OS::Heat::SoftwareConfig - properties: - group: script - config: - list_join: - - "\n" - - - - "#!/bin/bash" - - str_replace: - template: {get_file: ../../common/templates/kubernetes/fragments/write-heat-params.sh} - params: - $INSTANCE_NAME: {get_param: name} - $PROMETHEUS_MONITORING: {get_param: prometheus_monitoring} - $KUBE_ALLOW_PRIV: {get_param: kube_allow_priv} - $KUBE_MASTER_IP: {get_param: kube_master_ip} - $KUBE_API_PORT: {get_param: kubernetes_port} - $KUBE_NODE_PUBLIC_IP: {get_attr: [kube_minion_floating, floating_ip_address]} - $KUBE_NODE_IP: {get_attr: [kube_minion_eth0, fixed_ips, 0, ip_address]} - $ETCD_SERVER_IP: {get_param: etcd_server_ip} - $DOCKER_VOLUME: {get_resource: docker_volume} - $DOCKER_VOLUME_SIZE: {get_param: docker_volume_size} - $DOCKER_STORAGE_DRIVER: {get_param: docker_storage_driver} - $CGROUP_DRIVER: {get_param: cgroup_driver} - $NETWORK_DRIVER: {get_param: network_driver} - $REGISTRY_ENABLED: {get_param: registry_enabled} - $REGISTRY_PORT: {get_param: registry_port} - $SWIFT_REGION: {get_param: swift_region} - $REGISTRY_CONTAINER: {get_param: registry_container} - $REGISTRY_INSECURE: {get_param: registry_insecure} - $REGISTRY_CHUNKSIZE: {get_param: registry_chunksize} - $TLS_DISABLED: {get_param: tls_disabled} - $VERIFY_CA: {get_param: verify_ca} - $CLUSTER_UUID: {get_param: cluster_uuid} - $MAGNUM_URL: {get_param: magnum_url} - $USERNAME: {get_param: username} - $PASSWORD: {get_param: password} - $VOLUME_DRIVER: {get_param: volume_driver} - $REGION_NAME: {get_param: region_name} - $HTTP_PROXY: {get_param: http_proxy} - $HTTPS_PROXY: {get_param: https_proxy} - $NO_PROXY: {get_param: no_proxy} - $HYPERKUBE_PREFIX: {get_param: hyperkube_prefix} - $KUBE_TAG: {get_param: kube_tag} - $FLANNEL_NETWORK_CIDR: {get_param: flannel_network_cidr} - $PODS_NETWORK_CIDR: {get_param: pods_network_cidr} - $KUBE_VERSION: {get_param: kube_version} - $TRUSTEE_USER_ID: {get_param: trustee_user_id} - $TRUSTEE_USERNAME: {get_param: trustee_username} - $TRUSTEE_PASSWORD: {get_param: trustee_password} - $TRUSTEE_DOMAIN_ID: {get_param: trustee_domain_id} - $TRUST_ID: {get_param: trust_id} - $AUTH_URL: {get_param: auth_url} - $CLOUD_PROVIDER_ENABLED: {get_param: cloud_provider_enabled} - $INSECURE_REGISTRY_URL: {get_param: insecure_registry_url} - $CONTAINER_INFRA_PREFIX: {get_param: container_infra_prefix} - $DNS_SERVICE_IP: {get_param: dns_service_ip} - $DNS_CLUSTER_DOMAIN: {get_param: dns_cluster_domain} - $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} - $AUTO_HEALING_ENABLED: {get_param: auto_healing_enabled} - $AUTO_HEALING_CONTROLLER: {get_param: auto_healing_controller} - $NPD_ENABLED: {get_param: npd_enabled} - $NODEGROUP_ROLE: {get_param: nodegroup_role} - $NODEGROUP_NAME: {get_param: nodegroup_name} - $USE_PODMAN: {get_param: use_podman} - $CONTAINER_RUNTIME: {get_param: container_runtime} - $CONTAINERD_VERSION: {get_param: containerd_version} - $CONTAINERD_TARBALL_URL: {get_param: containerd_tarball_url} - $CONTAINERD_TARBALL_SHA256: {get_param: containerd_tarball_sha256} - - get_file: ../../common/templates/kubernetes/fragments/install-cri.sh - - get_file: ../../common/templates/kubernetes/fragments/install-clients.sh - - get_file: ../../common/templates/kubernetes/fragments/write-kube-os-config.sh - - get_file: ../../common/templates/kubernetes/fragments/make-cert-client.sh - - get_file: ../../common/templates/fragments/configure-docker-registry.sh - - get_file: ../../common/templates/kubernetes/fragments/configure-kubernetes-minion.sh - - get_file: ../../common/templates/kubernetes/fragments/add-proxy.sh - - str_replace: - template: {get_file: ../../common/templates/fragments/configure-docker-storage.sh} - params: - $configure_docker_storage_driver: {get_file: ../../common/templates/fragments/configure_docker_storage_driver_atomic.sh} - - get_file: ../../common/templates/kubernetes/fragments/enable-services-minion.sh - - get_file: ../../common/templates/fragments/enable-docker-registry.sh - - node_config_deployment: - type: OS::Heat::SoftwareDeployment - properties: - signal_transport: HEAT_SIGNAL - config: {get_resource: node_config} - server: {if: ["volume_based", {get_resource: kube-minion-bfv}, {get_resource: kube-minion}]} - actions: ['CREATE'] - - ###################################################################### - # - # a single kubernetes minion. - # - - kube_node_volume: - type: OS::Cinder::Volume - condition: volume_based - properties: - image: {get_param: server_image} - size: {get_param: boot_volume_size} - volume_type: {get_param: boot_volume_type} - availability_zone: {get_param: availability_zone} - - # do NOT use "_" (underscore) in the Nova server name - # it creates a mismatch between the generated Nova name and its hostname - # which can lead to weird problems - kube-minion: - condition: image_based - type: OS::Nova::Server - properties: - name: {get_param: name} - flavor: {get_param: minion_flavor} - image: {get_param: server_image} - key_name: {get_param: ssh_key_name} - user_data: {get_resource: agent_config} - user_data_format: SOFTWARE_CONFIG - software_config_transport: POLL_SERVER_HEAT - networks: - - port: {get_resource: kube_minion_eth0} - scheduler_hints: { group: { get_param: nodes_server_group_id }} - availability_zone: {get_param: availability_zone} - - kube-minion-bfv: - condition: volume_based - type: OS::Nova::Server - properties: - name: {get_param: name} - flavor: {get_param: minion_flavor} - key_name: {get_param: ssh_key_name} - user_data: {get_resource: agent_config} - user_data_format: SOFTWARE_CONFIG - software_config_transport: POLL_SERVER_HEAT - networks: - - port: {get_resource: kube_minion_eth0} - scheduler_hints: { group: { get_param: nodes_server_group_id }} - availability_zone: {get_param: availability_zone} - block_device_mapping_v2: - - boot_index: 0 - volume_id: {get_resource: kube_node_volume} - - kube_minion_eth0: - type: OS::Neutron::Port - properties: - network: {get_param: fixed_network} - security_groups: - - get_param: secgroup_kube_minion_id - fixed_ips: - - subnet: {get_param: fixed_subnet} - allowed_address_pairs: - - ip_address: {get_param: pods_network_cidr} - replacement_policy: AUTO - - kube_minion_floating: - type: Magnum::Optional::KubeMinion::Neutron::FloatingIP - properties: - floating_network: {get_param: external_network} - port_id: {get_resource: kube_minion_eth0} - depends_on: kube-minion - - ###################################################################### - # - # docker storage. This allocates a cinder volume and attaches it - # to the minion. - # - - docker_volume: - type: Magnum::Optional::Cinder::Volume - properties: - size: {get_param: docker_volume_size} - volume_type: {get_param: docker_volume_type} - availability_zone: {get_param: availability_zone} - - docker_volume_attach: - type: Magnum::Optional::Cinder::VolumeAttachment - properties: - instance_uuid: {if: ["volume_based", {get_resource: kube-minion-bfv}, {get_resource: kube-minion}]} - volume_id: {get_resource: docker_volume} - mountpoint: /dev/vdb - - upgrade_kubernetes: - type: OS::Heat::SoftwareConfig - properties: - group: script - inputs: - - name: kube_tag_input - - name: ostree_remote_input - - name: ostree_commit_input - config: - list_join: - - "\n" - - - - "#!/bin/bash" - - get_file: ../../common/templates/kubernetes/fragments/upgrade-kubernetes.sh - - upgrade_kubernetes_deployment: - type: OS::Heat::SoftwareDeployment - properties: - signal_transport: HEAT_SIGNAL - config: {get_resource: upgrade_kubernetes} - server: {if: ["volume_based", {get_resource: kube-minion-bfv}, {get_resource: kube-minion}]} - actions: ['UPDATE'] - input_values: - kube_tag_input: {get_param: kube_tag} - ostree_remote_input: {get_param: ostree_remote} - ostree_commit_input: {get_param: ostree_commit} - -outputs: - - kube_minion_ip: - value: {get_attr: [kube_minion_eth0, fixed_ips, 0, ip_address]} - description: > - This is the "public" IP address of the Kubernetes minion node. - - kube_minion_external_ip: - value: {get_attr: [kube_minion_floating, floating_ip_address]} - description: > - This is the "public" IP address of the Kubernetes minion node. - - ###################################################################### - # - # NOTE(flwang): Returning the minion node server ID here so that - # consumer can send API request to Heat to remove a particular - # node with removal_policies. Otherwise, the consumer (e.g. AutoScaler) - # has to use index to do the remove which is confusing out of the - # OpenStack world. - # https://storyboard.openstack.org/#!/story/2005054 - # - ###################################################################### - - OS::stack_id: - value: {if: ["volume_based", {get_resource: kube-minion-bfv}, {get_resource: kube-minion}]} - description: > - This is the Nova server id of the node. diff --git a/magnum/drivers/k8s_fedora_atomic_v1/tools/grafana-prometheus-dashboard.json b/magnum/drivers/k8s_fedora_atomic_v1/tools/grafana-prometheus-dashboard.json deleted file mode 100644 index cd69765081..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/tools/grafana-prometheus-dashboard.json +++ /dev/null @@ -1,2079 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "Compliant with Prometheus 1.5.2", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "panel", - "id": "singlestat", - "name": "Singlestat", - "version": "" - }, - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "3.1.1" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.3.0" - } - ], - "id": null, - "title": "Kubernetes cluster monitoring (via Prometheus)", - "description": "Monitors Kubernetes cluster using Prometheus. Shows overall cluster CPU / Memory / Filesystem usage as well as individual pod, containers, systemd services statistics. Uses cAdvisor metrics only.", - "tags": [ - "kubernetes" - ], - "style": "dark", - "timezone": "browser", - "editable": true, - "hideControls": false, - "sharedCrosshair": false, - "rows": [ - { - "collapse": false, - "editable": true, - "height": "200px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)", - "thresholdLine": false - }, - "height": "200px", - "id": 32, - "isNew": true, - "legend": { - "alignAsTable": false, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": false, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (container_network_receive_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Received", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{kubernetes_io_hostname=~\"^$Node$\"}[1m]))", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "Sent", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Network I/O pressure", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 0, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Network I/O pressure" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "180px", - "id": 4, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"}) * 100", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Cluster memory usage", - "transparent": false, - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "180px", - "id": 6, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) / sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"}) * 100", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Cluster CPU usage (1m avg)", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": true, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "180px", - "id": 7, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 4, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_fs_usage_bytes{device=~\"^/dev/.*$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) / sum (container_fs_limit_bytes{device=~\"^/dev/.*$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) * 100", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 10 - } - ], - "thresholds": "65, 90", - "title": "Cluster filesystem usage", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 9, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "20%", - "prefix": "", - "prefixFontSize": "20%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 10, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (machine_memory_bytes{kubernetes_io_hostname=~\"^$Node$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 11, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": " cores", - "postfixFontSize": "30%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{id=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m]))", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 12, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": " cores", - "postfixFontSize": "30%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (machine_cpu_cores{kubernetes_io_hostname=~\"^$Node$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 13, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_fs_usage_bytes{device=~\"^/dev/.*$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Used", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": false, - "colors": [ - "rgba(50, 172, 45, 0.97)", - "rgba(237, 129, 40, 0.89)", - "rgba(245, 54, 54, 0.9)" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "format": "bytes", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "height": "1px", - "id": 14, - "interval": null, - "isNew": true, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "span": 2, - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false - }, - "targets": [ - { - "expr": "sum (container_fs_limit_bytes{device=~\"^/dev/.*$\",id=\"/\",kubernetes_io_hostname=~\"^$Node$\"})", - "interval": "10s", - "intervalFactor": 1, - "refId": "A", - "step": 10 - } - ], - "thresholds": "", - "title": "Total", - "type": "singlestat", - "valueFontSize": "50%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - } - ], - "showTitle": false, - "title": "Total usage" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "height": "", - "id": 17, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (pod_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ pod_name }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Pods CPU usage (1m avg)", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "transparent": false, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "showTitle": false, - "title": "Pods CPU usage" - }, - { - "collapse": true, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "height": "", - "id": 23, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{systemd_service_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (systemd_service_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ systemd_service_name }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "System services CPU usage (1m avg)", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "System services CPU usage" - }, - { - "collapse": true, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "height": "", - "id": 24, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "hideEmpty": false, - "hideZero": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": null, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",name=~\"^k8s_.*\",container_name!=\"POD\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (container_name, pod_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "pod: {{ pod_name }} | {{ container_name }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - }, - { - "expr": "sum (rate (container_cpu_usage_seconds_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, name, image)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", - "metric": "container_cpu", - "refId": "B", - "step": 10 - }, - { - "expr": "sum (rate (container_cpu_usage_seconds_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", - "metric": "container_cpu", - "refId": "C", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Containers CPU usage (1m avg)", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Containers CPU usage" - }, - { - "collapse": true, - "editable": true, - "height": "500px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 3, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 20, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (rate (container_cpu_usage_seconds_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ id }}", - "metric": "container_cpu", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "All processes CPU usage (1m avg)", - "tooltip": { - "msResolution": true, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "none", - "label": "cores", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "repeat": null, - "showTitle": false, - "title": "All processes CPU usage" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 25, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}) by (pod_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ pod_name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Pods memory usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Pods memory usage" - }, - { - "collapse": true, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 26, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{systemd_service_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}) by (systemd_service_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ systemd_service_name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "System services memory usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "System services memory usage" - }, - { - "collapse": true, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 27, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{image!=\"\",name=~\"^k8s_.*\",container_name!=\"POD\",kubernetes_io_hostname=~\"^$Node$\"}) by (container_name, pod_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "pod: {{ pod_name }} | {{ container_name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - }, - { - "expr": "sum (container_memory_working_set_bytes{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}) by (kubernetes_io_hostname, name, image)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", - "metric": "container_memory_usage:sort_desc", - "refId": "B", - "step": 10 - }, - { - "expr": "sum (container_memory_working_set_bytes{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}) by (kubernetes_io_hostname, rkt_container_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", - "metric": "container_memory_usage:sort_desc", - "refId": "C", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Containers memory usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Containers memory usage" - }, - { - "collapse": true, - "editable": true, - "height": "500px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 0, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 28, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "sum (container_memory_working_set_bytes{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}) by (id)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "{{ id }}", - "metric": "container_memory_usage:sort_desc", - "refId": "A", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "All processes memory usage", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "bytes", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "All processes memory usage" - }, - { - "collapse": false, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 16, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (pod_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "-> {{ pod_name }}", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (pod_name)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "<- {{ pod_name }}", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Pods network I/O (1m avg)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Pods network I/O" - }, - { - "collapse": true, - "editable": true, - "height": "250px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 30, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (container_name, pod_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "-> pod: {{ pod_name }} | {{ container_name }}", - "metric": "network", - "refId": "B", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name=~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (container_name, pod_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "<- pod: {{ pod_name }} | {{ container_name }}", - "metric": "network", - "refId": "D", - "step": 10 - }, - { - "expr": "sum (rate (container_network_receive_bytes_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, name, image)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "-> docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{image!=\"\",name!~\"^k8s_.*\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, name, image)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "<- docker: {{ kubernetes_io_hostname }} | {{ image }} ({{ name }})", - "metric": "network", - "refId": "C", - "step": 10 - }, - { - "expr": "sum (rate (container_network_transmit_bytes_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "-> rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", - "metric": "network", - "refId": "E", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{rkt_container_name!=\"\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (kubernetes_io_hostname, rkt_container_name)", - "hide": false, - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "<- rkt: {{ kubernetes_io_hostname }} | {{ rkt_container_name }}", - "metric": "network", - "refId": "F", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Containers network I/O (1m avg)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "Containers network I/O" - }, - { - "collapse": true, - "editable": true, - "height": "500px", - "panels": [ - { - "aliasColors": {}, - "bars": false, - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "editable": true, - "error": false, - "fill": 1, - "grid": { - "threshold1": null, - "threshold1Color": "rgba(216, 200, 27, 0.27)", - "threshold2": null, - "threshold2Color": "rgba(234, 112, 112, 0.22)" - }, - "id": 29, - "isNew": true, - "legend": { - "alignAsTable": true, - "avg": true, - "current": true, - "max": false, - "min": false, - "rightSide": false, - "show": true, - "sideWidth": 200, - "sort": "current", - "sortDesc": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 2, - "links": [], - "nullPointMode": "connected", - "percentage": false, - "pointradius": 5, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "span": 12, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "sum (rate (container_network_receive_bytes_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "-> {{ id }}", - "metric": "network", - "refId": "A", - "step": 10 - }, - { - "expr": "- sum (rate (container_network_transmit_bytes_total{id!=\"/\",kubernetes_io_hostname=~\"^$Node$\"}[1m])) by (id)", - "interval": "10s", - "intervalFactor": 1, - "legendFormat": "<- {{ id }}", - "metric": "network", - "refId": "B", - "step": 10 - } - ], - "timeFrom": null, - "timeShift": null, - "title": "All processes network I/O (1m avg)", - "tooltip": { - "msResolution": false, - "shared": true, - "sort": 2, - "value_type": "cumulative" - }, - "type": "graph", - "xaxis": { - "show": true - }, - "yaxes": [ - { - "format": "Bps", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": false - } - ] - } - ], - "title": "All processes network I/O" - } - ], - "time": { - "from": "now-5m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "templating": { - "list": [ - { - "allValue": ".*", - "current": {}, - "datasource": "${DS_PROMETHEUS}", - "hide": 0, - "includeAll": true, - "multi": false, - "name": "Node", - "options": [], - "query": "label_values(kubernetes_io_hostname)", - "refresh": 1, - "type": "query" - } - ] - }, - "annotations": { - "list": [] - }, - "refresh": "10s", - "schemaVersion": 12, - "version": 13, - "links": [], - "gnetId": 1621 -} \ No newline at end of file diff --git a/magnum/drivers/k8s_fedora_atomic_v1/version.py b/magnum/drivers/k8s_fedora_atomic_v1/version.py deleted file mode 100644 index 2de5b8fc69..0000000000 --- a/magnum/drivers/k8s_fedora_atomic_v1/version.py +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2016 - Rackspace Hosting -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -version = '1.0.0' -driver = 'k8s_fedora_atomic_v1' -container_version = '1.12.6' diff --git a/magnum/drivers/k8s_fedora_coreos_v1/version.py b/magnum/drivers/k8s_fedora_coreos_v1/version.py index 2de5b8fc69..01c125536a 100644 --- a/magnum/drivers/k8s_fedora_coreos_v1/version.py +++ b/magnum/drivers/k8s_fedora_coreos_v1/version.py @@ -13,5 +13,5 @@ # limitations under the License. version = '1.0.0' -driver = 'k8s_fedora_atomic_v1' +driver = 'k8s_fedora_coreos_v1' container_version = '1.12.6' diff --git a/magnum/tests/contrib/copy_instance_logs.sh b/magnum/tests/contrib/copy_instance_logs.sh index 992dc7fd60..8b3de1b3aa 100755 --- a/magnum/tests/contrib/copy_instance_logs.sh +++ b/magnum/tests/contrib/copy_instance_logs.sh @@ -98,8 +98,6 @@ if [[ "$COE" == "kubernetes" ]]; then remote_exec $SSH_USER "sudo cat /etc/systemd/system/flannel-config.service" flannel-config.service remote_exec $SSH_USER "sudo journalctl -u heat-container-agent --no-pager" heat-container-agent.log remote_exec $SSH_USER "sudo journalctl -u kube-enable-monitoring --no-pager" kube-enable-monitoring.service.log - remote_exec $SSH_USER "sudo atomic containers list" atomic-containers-list.log - remote_exec $SSH_USER "sudo atomic images list" atomic-images-list.log else echo "ERROR: Unknown COE '${COE}'" EXIT_CODE=1 diff --git a/magnum/tests/unit/api/controllers/v1/test_cluster_template.py b/magnum/tests/unit/api/controllers/v1/test_cluster_template.py index 11d70ada59..1b973bc402 100644 --- a/magnum/tests/unit/api/controllers/v1/test_cluster_template.py +++ b/magnum/tests/unit/api/controllers/v1/test_cluster_template.py @@ -641,7 +641,7 @@ class TestPost(api_base.FunctionalTest): test_time = datetime.datetime(2000, 1, 1, 0, 0) mock_utcnow.return_value = test_time mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} response = self.post_json('/clustertemplates', bdict) self.assertEqual(201, response.status_int) @@ -663,7 +663,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() self.post_json('/clustertemplates', bdict) cc_mock.assert_called_once_with(mock.ANY) @@ -679,7 +679,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(image_id='my-image') response = self.post_json('/clustertemplates', bdict) self.assertEqual(bdict['image_id'], response.json['image_id']) @@ -695,7 +695,7 @@ class TestPost(api_base.FunctionalTest): mock.patch('magnum.api.attr_validator.validate_image')\ as mock_image_data: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(**kwargs) self.assertRaises(AppError, self.post_json, '/clustertemplates', bdict) @@ -753,7 +753,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data( labels={'key1': 'val1', 'key2': 'val2'}) response = self.post_json('/clustertemplates', bdict) @@ -769,7 +769,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(docker_volume_size=99) response = self.post_json('/clustertemplates', bdict) self.assertEqual(bdict['docker_volume_size'], @@ -783,7 +783,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data( docker_volume_size=1, docker_storage_driver="overlay") note = 'deprecated in favor of overlay2' @@ -803,7 +803,7 @@ class TestPost(api_base.FunctionalTest): expect_default_driver, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} for k, v in cluster_template_config_dict.items(): cfg.CONF.set_override(k, v, 'cluster_template') with mock.patch.object( @@ -900,7 +900,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict) self.assertEqual(bdict['volume_driver'], @@ -917,7 +917,7 @@ class TestPost(api_base.FunctionalTest): wraps=self.dbapi.create_cluster_template) as cc_mock: mock_policy.return_value = True mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(public=True) response = self.post_json('/clustertemplates', bdict) self.assertTrue(response.json['public']) @@ -937,7 +937,7 @@ class TestPost(api_base.FunctionalTest): # make policy enforcement fail mock_policy.return_value = False mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(public=True) self.assertRaises(AppError, self.post_json, '/clustertemplates', bdict) @@ -950,7 +950,7 @@ class TestPost(api_base.FunctionalTest): self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template) as cc_mock: mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(public=False) response = self.post_json('/clustertemplates', bdict) self.assertFalse(response.json['public']) @@ -969,7 +969,7 @@ class TestPost(api_base.FunctionalTest): wraps=self.dbapi.create_cluster_template) as cc_mock: mock_policy.return_value = True mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(hidden=True) response = self.post_json('/clustertemplates', bdict) self.assertTrue(response.json['hidden']) @@ -989,7 +989,7 @@ class TestPost(api_base.FunctionalTest): # make policy enforcement fail mock_policy.return_value = False mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data(hidden=True) self.assertRaises(AppError, self.post_json, '/clustertemplates', bdict) @@ -1008,7 +1008,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_with_os_distro_image(self, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() del bdict['uuid'] response = self.post_json('/clustertemplates', bdict, @@ -1019,7 +1019,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_with_image_name(self, mock_image_data): mock_image = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} mock_image_data.return_value = mock_image bdict = apiutils.cluster_template_post_data() del bdict['uuid'] @@ -1058,7 +1058,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_without_keypair_id(self, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() del bdict['keypair_id'] response = self.post_json('/clustertemplates', bdict) @@ -1068,7 +1068,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_with_dns(self, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict) self.assertEqual(201, response.status_int) @@ -1080,7 +1080,7 @@ class TestPost(api_base.FunctionalTest): mock_image_data): self.mock_valid_os_res.side_effect = exception.KeyPairNotFound("Test") mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict, expect_errors=True) @@ -1090,7 +1090,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_with_flavor(self, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict) self.assertEqual(201, response.status_int) @@ -1104,7 +1104,7 @@ class TestPost(api_base.FunctionalTest): mock_image_data): self.mock_valid_os_res.side_effect = exception.FlavorNotFound("flavor") mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict, expect_errors=True) @@ -1114,7 +1114,7 @@ class TestPost(api_base.FunctionalTest): def test_create_cluster_template_with_external_network(self, mock_image_data): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict) self.assertEqual(201, response.status_int) @@ -1127,7 +1127,7 @@ class TestPost(api_base.FunctionalTest): self.mock_valid_os_res.side_effect = exception.ExternalNetworkNotFound( "test") mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() response = self.post_json('/clustertemplates', bdict, expect_errors=True) @@ -1138,7 +1138,7 @@ class TestPost(api_base.FunctionalTest): with mock.patch.object(self.dbapi, 'create_cluster_template', wraps=self.dbapi.create_cluster_template): mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} bdict = apiutils.cluster_template_post_data() bdict.pop('name') resp = self.post_json('/clustertemplates', bdict) @@ -1162,7 +1162,7 @@ class TestPost(api_base.FunctionalTest): test_time = datetime.datetime(2000, 1, 1, 0, 0) mock_utcnow.return_value = test_time mock_image_data.return_value = {'name': 'mock_name', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} response = self.post_json('/clustertemplates', bdict) self.assertEqual(201, response.status_int) @@ -1180,7 +1180,7 @@ class TestPost(api_base.FunctionalTest): @mock.patch('magnum.api.attr_validator.validate_image') def test_create_cluster_template_with_driver_name(self, mock_image_data): mock_image = {'name': 'mock_name', - 'os_distro': 'fedora-atomic', + 'os_distro': 'fedora-coreos', 'magnum_driver': 'mock_driver'} mock_image_data.return_value = mock_image bdict = apiutils.cluster_template_post_data() diff --git a/magnum/tests/unit/api/test_attr_validator.py b/magnum/tests/unit/api/test_attr_validator.py index 1781f87ff4..5a30197550 100644 --- a/magnum/tests/unit/api/test_attr_validator.py +++ b/magnum/tests/unit/api/test_attr_validator.py @@ -205,12 +205,12 @@ class TestAttrValidator(base.BaseTestCase): @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_with_valid_image_by_name(self, mock_os_res): - mock_image = {'name': 'fedora-21-atomic-5', + mock_image = {'name': 'fedora-21-coreos-5', 'id': 'e33f0988-1730-405e-8401-30cbc8535302', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} mock_os_res.return_value = mock_image mock_os_cli = mock.MagicMock() - attr_validator.validate_image(mock_os_cli, 'fedora-21-atomic-5') + attr_validator.validate_image(mock_os_cli, 'fedora-21-coreos-5') self.assertTrue(mock_os_res.called) @mock.patch('magnum.api.utils.get_openstack_resource') @@ -222,13 +222,13 @@ class TestAttrValidator(base.BaseTestCase): mock_os_cli = mock.MagicMock() self.assertRaises(exception.ImageNotAuthorized, attr_validator.validate_image, mock_os_cli, - 'fedora-21-atomic-5') + 'fedora-21-coreos-5') @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_with_valid_image_by_id(self, mock_os_res): - mock_image = {'name': 'fedora-21-atomic-5', + mock_image = {'name': 'fedora-21-coreos-5', 'id': 'e33f0988-1730-405e-8401-30cbc8535302', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} mock_os_res.return_value = mock_image mock_os_cli = mock.MagicMock() attr_validator.validate_image(mock_os_cli, @@ -241,7 +241,7 @@ class TestAttrValidator(base.BaseTestCase): mock_os_cli = mock.MagicMock() self.assertRaises(exception.ImageNotFound, attr_validator.validate_image, - mock_os_cli, 'fedora-21-atomic-5') + mock_os_cli, 'fedora-21-coreos-5') @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_with_nonexist_image_by_id(self, mock_os_res): @@ -249,7 +249,7 @@ class TestAttrValidator(base.BaseTestCase): mock_os_cli = mock.MagicMock() self.assertRaises(exception.ImageNotFound, attr_validator.validate_image, - mock_os_cli, 'fedora-21-atomic-5') + mock_os_cli, 'fedora-21-coreos-5') @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_with_multi_images_same_name(self, mock_os_res): @@ -257,28 +257,28 @@ class TestAttrValidator(base.BaseTestCase): mock_os_cli = mock.MagicMock() self.assertRaises(exception.Conflict, attr_validator.validate_image, - mock_os_cli, 'fedora-21-atomic-5') + mock_os_cli, 'fedora-21-coreos-5') @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_without_os_distro(self, mock_os_res): - mock_image = {'name': 'fedora-21-atomic-5', + mock_image = {'name': 'fedora-21-coreos-5', 'id': 'e33f0988-1730-405e-8401-30cbc8535302'} mock_os_res.return_value = mock_image mock_os_cli = mock.MagicMock() self.assertRaises(exception.OSDistroFieldNotFound, attr_validator.validate_image, - mock_os_cli, 'fedora-21-atomic-5') + mock_os_cli, 'fedora-21-coreos-5') @mock.patch('magnum.api.utils.get_openstack_resource') def test_validate_image_when_user_forbidden(self, mock_os_res): - mock_image = {'name': 'fedora-21-atomic-5', + mock_image = {'name': 'fedora-21-coreos-5', 'id': 'e33f0988-1730-405e-8401-30cbc8535302', 'os_distro': ''} mock_os_res.return_value = mock_image mock_os_cli = mock.MagicMock() self.assertRaises(exception.OSDistroFieldNotFound, attr_validator.validate_image, - mock_os_cli, 'fedora-21-atomic-5') + mock_os_cli, 'fedora-21-coreos-5') @mock.patch('magnum.common.clients.OpenStackClients') def test_validate_os_resources_with_invalid_flavor(self, @@ -355,9 +355,9 @@ class TestAttrValidator(base.BaseTestCase): } mock_keypair = mock.MagicMock() mock_keypair.id = 'test-keypair' - mock_image = {'name': 'fedora-21-atomic-5', + mock_image = {'name': 'fedora-21-coreos-5', 'id': 'e33f0988-1730-405e-8401-30cbc8535302', - 'os_distro': 'fedora-atomic'} + 'os_distro': 'fedora-coreos'} mock_nova = mock.MagicMock() mock_nova.keypairs.get.return_value = mock_keypair mock_nova.images.get.return_value = mock_image diff --git a/magnum/tests/unit/api/test_validation.py b/magnum/tests/unit/api/test_validation.py index ca57876e55..8a57793803 100644 --- a/magnum/tests/unit/api/test_validation.py +++ b/magnum/tests/unit/api/test_validation.py @@ -60,7 +60,7 @@ class TestValidation(base.BaseTestCase): self, mock_cluster_template_get, mock_cluster_get_by_uuid, mock_pecan_request): - cluster_type = ('vm', 'fedora-atomic', 'kubernetes') + cluster_type = ('vm', 'fedora-coreos', 'kubernetes') self._test_enforce_cluster_type_supported( mock_cluster_template_get, mock_cluster_get_by_uuid, mock_pecan_request, cluster_type) diff --git a/magnum/tests/unit/conductor/handlers/test_cluster_conductor.py b/magnum/tests/unit/conductor/handlers/test_cluster_conductor.py index c8e150f2ee..d93c0f24ba 100644 --- a/magnum/tests/unit/conductor/handlers/test_cluster_conductor.py +++ b/magnum/tests/unit/conductor/handlers/test_cluster_conductor.py @@ -24,7 +24,7 @@ from pycadf import cadftaxonomy as taxonomy from magnum.common import exception from magnum.conductor.handlers import cluster_conductor import magnum.conf -from magnum.drivers.k8s_fedora_atomic_v1 import driver as k8s_atomic_dr +from magnum.drivers.k8s_fedora_coreos_v1 import driver as k8s_fcos_dr from magnum import objects from magnum.objects.fields import ClusterHealthStatus from magnum.objects.fields import ClusterStatus as cluster_status @@ -410,7 +410,7 @@ class TestHandler(db_base.DbTestCase): @patch('heatclient.common.template_utils.get_template_contents') @patch('magnum.conductor.handlers.cluster_conductor.trust_manager') @patch('magnum.conductor.handlers.cluster_conductor.cert_manager') - @patch('magnum.drivers.k8s_fedora_atomic_v1.driver.Driver.' + @patch('magnum.drivers.k8s_fedora_coreos_v1.driver.Driver.' '_extract_template_definition') @patch('magnum.drivers.common.driver.Driver.get_driver') @patch('magnum.common.clients.OpenStackClients') @@ -429,7 +429,7 @@ class TestHandler(db_base.DbTestCase): mock_poller = mock.MagicMock() mock_poller.poll_and_check.return_value = loopingcall.LoopingCallDone() mock_heat_poller_class.return_value = mock_poller - mock_driver.return_value = k8s_atomic_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() mock_short_id.return_value = 'short_id' mock_extract_tmpl_def.return_value = ( @@ -508,7 +508,7 @@ class TestHandler(db_base.DbTestCase): def test_cluster_delete(self, mock_octavia, mock_driver, mock_openstack_client_class, cert_manager): mock_octavia.return_value = False - mock_driver.return_value = k8s_atomic_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() osc = mock.MagicMock() mock_openstack_client_class.return_value = osc osc.heat.side_effect = exc.HTTPNotFound @@ -544,7 +544,7 @@ class TestHandler(db_base.DbTestCase): mock_openstack_client_class, cert_manager): mock_octavia.return_value = False - mock_driver.return_value = k8s_atomic_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() osc = mock.MagicMock() mock_openstack_client_class.return_value = osc osc.heat.side_effect = exc.HTTPConflict @@ -575,7 +575,7 @@ class TestHandler(db_base.DbTestCase): def test_cluster_delete_with_lb(self, mock_delete_lb, mock_octavia, mock_clients, mock_driver): mock_octavia.return_value = True - mock_driver.return_value = k8s_atomic_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() self.master.create() self.worker.create() diff --git a/magnum/tests/unit/conductor/handlers/test_k8s_cluster_conductor.py b/magnum/tests/unit/conductor/handlers/test_k8s_cluster_conductor.py index 13b73eea27..4999601ee4 100644 --- a/magnum/tests/unit/conductor/handlers/test_k8s_cluster_conductor.py +++ b/magnum/tests/unit/conductor/handlers/test_k8s_cluster_conductor.py @@ -16,7 +16,6 @@ from unittest import mock from unittest.mock import patch import magnum.conf -from magnum.drivers.k8s_fedora_atomic_v1 import driver as k8s_dr from magnum.drivers.k8s_fedora_coreos_v1 import driver as k8s_fcos_dr from magnum import objects from magnum.tests import base @@ -49,7 +48,7 @@ class TestClusterConductorWithK8s(base.TestCase): 'volume_driver': 'volume_driver', 'docker_volume_size': 20, 'docker_storage_driver': 'devicemapper', - 'cluster_distro': 'fedora-atomic', + 'cluster_distro': 'fedora-coreos', 'coe': 'kubernetes', 'token': None, 'http_proxy': 'http_proxy', @@ -245,7 +244,7 @@ class TestClusterConductorWithK8s(base.TestCase): worker_ng = objects.NodeGroup(self.context, **self.worker_ng_dict) master_ng = objects.NodeGroup(self.context, **self.master_ng_dict) mock_objects_nodegroup_list.return_value = [master_ng, worker_ng] - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() mock_get_subnet.return_value = self.fixed_subnet_cidr @@ -440,7 +439,7 @@ class TestClusterConductorWithK8s(base.TestCase): worker_ng = objects.NodeGroup(self.context, **self.worker_ng_dict) master_ng = objects.NodeGroup(self.context, **self.master_ng_dict) mock_objects_nodegroup_list.return_value = [master_ng, worker_ng] - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() mock_get_subnet.return_value = self.fixed_subnet_cidr CONF.set_override('swift_region', @@ -593,7 +592,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_resp = mock.MagicMock() mock_resp.text = expected_result mock_get.return_value = mock_resp - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() cluster = objects.Cluster(self.context, **self.cluster_dict) del self.worker_ng_dict['image_id'] worker_ng = objects.NodeGroup(self.context, **self.worker_ng_dict) @@ -976,7 +975,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_objects_cluster_template_get_by_uuid, mock_get, mock_get_subnet): - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() self._test_extract_template_definition( mock_generate_csr_and_key, mock_sign_node_certificate, @@ -1004,7 +1003,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_objects_cluster_template_get_by_uuid, mock_get, mock_get_subnet): - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() self._test_extract_template_definition( mock_generate_csr_and_key, mock_sign_node_certificate, @@ -1032,7 +1031,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_objects_cluster_template_get_by_uuid, mock_get, mock_get_subnet): - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() self._test_extract_template_definition( mock_generate_csr_and_key, mock_sign_node_certificate, @@ -1060,7 +1059,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_objects_cluster_template_get_by_uuid, mock_get, mock_get_subnet): - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() self._test_extract_template_definition( mock_generate_csr_and_key, mock_sign_node_certificate, @@ -1102,7 +1101,7 @@ class TestClusterConductorWithK8s(base.TestCase): worker_ng = objects.NodeGroup(self.context, **self.worker_ng_dict) master_ng = objects.NodeGroup(self.context, **self.master_ng_dict) mock_objects_nodegroup_list.return_value = [master_ng, worker_ng] - mock_driver.return_value = k8s_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() CONF.set_override('etcd_discovery_service_endpoint_format', 'http://etcd/test?size=%(size)d', @@ -1214,7 +1213,7 @@ class TestClusterConductorWithK8s(base.TestCase): @patch('magnum.common.short_id.generate_id') @patch('heatclient.common.template_utils.get_template_contents') - @patch('magnum.drivers.k8s_fedora_atomic_v1.driver.Driver.' + @patch('magnum.drivers.k8s_fedora_coreos_v1.driver.Driver.' '_extract_template_definition') @patch('magnum.common.clients.OpenStackClients') def test_create_stack(self, @@ -1239,8 +1238,8 @@ class TestClusterConductorWithK8s(base.TestCase): mock_cluster = mock.MagicMock() mock_cluster.name = dummy_cluster_name - k8s_dr.Driver().create_cluster(self.context, mock_cluster, - expected_timeout) + k8s_fcos_dr.Driver().create_cluster(self.context, mock_cluster, + expected_timeout) expected_args = { 'stack_name': expected_stack_name, @@ -1254,7 +1253,7 @@ class TestClusterConductorWithK8s(base.TestCase): @patch('magnum.common.short_id.generate_id') @patch('heatclient.common.template_utils.get_template_contents') - @patch('magnum.drivers.k8s_fedora_atomic_v1.driver.Driver.' + @patch('magnum.drivers.k8s_fedora_coreos_v1.driver.Driver.' '_extract_template_definition') @patch('magnum.common.clients.OpenStackClients') def test_create_stack_no_timeout_specified( @@ -1280,7 +1279,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_cluster = mock.MagicMock() mock_cluster.name = dummy_cluster_name - k8s_dr.Driver().create_cluster(self.context, mock_cluster, None) + k8s_fcos_dr.Driver().create_cluster(self.context, mock_cluster, None) expected_args = { 'stack_name': expected_stack_name, @@ -1294,7 +1293,7 @@ class TestClusterConductorWithK8s(base.TestCase): @patch('magnum.common.short_id.generate_id') @patch('heatclient.common.template_utils.get_template_contents') - @patch('magnum.drivers.k8s_fedora_atomic_v1.driver.Driver.' + @patch('magnum.drivers.k8s_fedora_coreos_v1.driver.Driver.' '_extract_template_definition') @patch('magnum.common.clients.OpenStackClients') def test_create_stack_timeout_is_zero( @@ -1321,8 +1320,8 @@ class TestClusterConductorWithK8s(base.TestCase): mock_cluster = mock.MagicMock() mock_cluster.name = dummy_cluster_name - k8s_dr.Driver().create_cluster(self.context, mock_cluster, - cluster_timeout) + k8s_fcos_dr.Driver().create_cluster(self.context, mock_cluster, + cluster_timeout) expected_args = { 'stack_name': expected_stack_name, @@ -1335,7 +1334,7 @@ class TestClusterConductorWithK8s(base.TestCase): mock_heat_client.stacks.create.assert_called_once_with(**expected_args) @patch('heatclient.common.template_utils.get_template_contents') - @patch('magnum.drivers.k8s_fedora_atomic_v1.driver.Driver.' + @patch('magnum.drivers.k8s_fedora_coreos_v1.driver.Driver.' '_extract_template_definition') @patch('magnum.common.clients.OpenStackClients') @patch('magnum.objects.ClusterTemplate.get_by_uuid') @@ -1364,7 +1363,7 @@ class TestClusterConductorWithK8s(base.TestCase): master_ng = objects.NodeGroup(self.context, **self.master_ng_dict) mock_objects_nodegroup_list.return_value = [master_ng, worker_ng] - k8s_dr.Driver().update_cluster({}, mock_cluster) + k8s_fcos_dr.Driver().update_cluster({}, mock_cluster) expected_args = { 'parameters': {'number_of_minions': 2}, diff --git a/magnum/tests/unit/db/utils.py b/magnum/tests/unit/db/utils.py index 7152b376b2..4ee5bf9e0a 100644 --- a/magnum/tests/unit/db/utils.py +++ b/magnum/tests/unit/db/utils.py @@ -41,7 +41,7 @@ def get_test_cluster_template(**kw): 'docker_volume_size': kw.get('docker_volume_size', 20), 'docker_storage_driver': kw.get('docker_storage_driver', 'devicemapper'), - 'cluster_distro': kw.get('cluster_distro', 'fedora-atomic'), + 'cluster_distro': kw.get('cluster_distro', 'fedora-coreos'), 'coe': kw.get('coe', 'kubernetes'), 'created_at': kw.get('created_at'), 'updated_at': kw.get('updated_at'), diff --git a/magnum/tests/unit/drivers/test_heat_driver.py b/magnum/tests/unit/drivers/test_heat_driver.py index 2e9fc7106d..50da84b203 100644 --- a/magnum/tests/unit/drivers/test_heat_driver.py +++ b/magnum/tests/unit/drivers/test_heat_driver.py @@ -18,7 +18,7 @@ from oslo_utils import uuidutils import magnum.conf from magnum.drivers.heat import driver as heat_driver -from magnum.drivers.k8s_fedora_atomic_v1 import driver as k8s_atomic_dr +from magnum.drivers.k8s_fedora_coreos_v1 import driver as k8s_fcos_dr from magnum import objects from magnum.objects.fields import ClusterStatus as cluster_status from magnum.tests import base @@ -128,10 +128,10 @@ class TestHeatPoller(base.TestCase): cluster_template = objects.ClusterTemplate(self.context, **cluster_template_dict) mock_retrieve_cluster_template.return_value = cluster_template - mock_driver.return_value = k8s_atomic_dr.Driver() + mock_driver.return_value = k8s_fcos_dr.Driver() poller = heat_driver.HeatPoller(mock_openstack_client, mock.MagicMock(), cluster, - k8s_atomic_dr.Driver()) + k8s_fcos_dr.Driver()) poller.get_version_info = mock.MagicMock() return (cluster, poller) diff --git a/magnum/tests/unit/drivers/test_k8s_fedora_atomic_v1_driver.py b/magnum/tests/unit/drivers/test_k8s_fedora_atomic_v1_driver.py deleted file mode 100644 index 9aeb63ca40..0000000000 --- a/magnum/tests/unit/drivers/test_k8s_fedora_atomic_v1_driver.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright (c) 2018 European Organization for Nuclear Research. -# All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); you may -# not use this file except in compliance with the License. You may obtain -# a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -# License for the specific language governing permissions and limitations -# under the License. - -from unittest.mock import patch - -from magnum.common import exception -from magnum.drivers.k8s_fedora_atomic_v1 import driver -from magnum.tests.unit.db import base -from magnum.tests.unit.objects import utils as obj_utils - - -class K8sFedoraAtomicV1DriverTest(base.DbTestCase): - - def setUp(self): - super(K8sFedoraAtomicV1DriverTest, self).setUp() - self.driver = driver.Driver() - self.cluster_template = obj_utils.create_test_cluster_template( - self.context, uuid='94889aa4-e686-11e9-81b4-2a2ae2dbcce4', - name='test_2', id=2, labels={'kube_tag': 'v1.14.7'}, - image_id='test-image2') - self.cluster_obj = obj_utils.create_test_cluster( - self.context, name='cluster_example_A', image_id='test-image1') - self.cluster_obj.refresh() - self.nodegroup_obj = obj_utils.create_test_nodegroup( - self.context, name='test_ng', cluster_id=self.cluster_obj.uuid, - uuid='27e3153e-d5bf-4b7e-b517-fb518e17f34c', - project_id=self.cluster_obj.project_id, is_default=False, - image_id='test-image1') - self.nodegroup_obj.refresh() - - @patch('magnum.common.keystone.KeystoneClientV3') - @patch('magnum.common.clients.OpenStackClients') - def test_upgrade_not_supported(self, mock_osc, mock_keystone): - self.assertRaises(exception.NotSupported, - self.driver.upgrade_cluster, self.context, - self.cluster_obj, self.cluster_template, 1, - self.nodegroup_obj) - - @patch('magnum.common.keystone.KeystoneClientV3') - @patch('magnum.common.clients.OpenStackClients') - def test_downgrade_not_supported(self, mock_osc, mock_keystone): - # Scenario, a user creates a nodegroup with kube_tag - # greater that the one set in cluster's template. Check - # that downgrading is not supported. - self.nodegroup_obj.labels = {'kube_tag': 'v1.14.7'} - self.nodegroup_obj.save() - self.cluster_template.labels = {'kube_tag': 'v1.14.3'} - self.cluster_template.save() - self.assertRaises(exception.NotSupported, - self.driver.upgrade_cluster, self.context, - self.cluster_obj, self.cluster_template, 1, - self.nodegroup_obj) - - @patch('magnum.common.keystone.KeystoneClientV3') - @patch('magnum.common.clients.OpenStackClients') - def test_upgrade_invalid_ct(self, mock_osc, mock_keystone): - # Scenario, a user creates a nodegroup with kube_tag - # greater that the one set in cluster's template. Check - # that downgrading is not supported. - self.cluster_template.labels = {} - self.cluster_template.save() - self.assertRaises(exception.NotSupported, - self.driver.upgrade_cluster, self.context, - self.cluster_obj, self.cluster_template, 1, - self.nodegroup_obj) - - @patch('magnum.common.keystone.KeystoneClientV3') - @patch('magnum.common.clients.OpenStackClients') - def test_ca_rotate_not_supported(self, mock_osc, mock_keystone): - self.cluster_template.cluster_distro = 'fedora-atomic' - self.cluster_template.save() - mock_keystone.is_octavia_enabled.return_value = False - self.assertRaises(exception.NotSupported, - self.driver.rotate_ca_certificate, - self.context, - self.cluster_obj) diff --git a/magnum/tests/unit/drivers/test_template_definition.py b/magnum/tests/unit/drivers/test_template_definition.py index a3f9d17e3a..08ac704464 100644 --- a/magnum/tests/unit/drivers/test_template_definition.py +++ b/magnum/tests/unit/drivers/test_template_definition.py @@ -19,8 +19,6 @@ from magnum.common import exception import magnum.conf from magnum.drivers.common import driver from magnum.drivers.heat import template_def as cmn_tdef -from magnum.drivers.k8s_fedora_atomic_v1 import driver as k8sa_dr -from magnum.drivers.k8s_fedora_atomic_v1 import template_def as k8sa_tdef from magnum.drivers.k8s_fedora_coreos_v1 import driver as k8s_fcos_dr from magnum.drivers.k8s_fedora_coreos_v1 import template_def as k8s_fcos_tdef from magnum.tests import base @@ -46,17 +44,6 @@ class TemplateDefinitionTestCase(base.TestCase): self.assertEqual(expected_entry_point, actual_entry_point) expected_entry_point.load.assert_called_once() - @mock.patch('magnum.drivers.common.driver.Driver.get_driver') - def test_get_vm_atomic_kubernetes_definition(self, mock_driver): - mock_driver.return_value = k8sa_dr.Driver() - cluster_driver = driver.Driver.get_driver('vm', - 'fedora-atomic', - 'kubernetes') - definition = cluster_driver.get_template_definition() - - self.assertIsInstance(definition, - k8sa_tdef.AtomicK8sTemplateDefinition) - @mock.patch('magnum.drivers.common.driver.Driver.get_driver') def test_get_vm_fcos_kubernetes_definition(self, mock_driver): mock_driver.return_value = k8s_fcos_dr.Driver() @@ -119,7 +106,7 @@ class TemplateDefinitionTestCase(base.TestCase): self.assertIsNone(value) def test_add_output_with_mapping_type(self): - definition = k8sa_dr.Driver().get_template_definition() + definition = k8s_fcos_dr.Driver().get_template_definition() mock_args = [1, 3, 4] mock_kwargs = {'cluster_attr': 'test'} @@ -307,10 +294,10 @@ class BaseK8sTemplateDefinitionTestCase(base.TestCase, metaclass=abc.ABCMeta): self.assertEqual(expected_address, actual) -class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): +class FCOSK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): def get_definition(self): - return k8sa_dr.Driver().get_template_definition() + return k8s_fcos_dr.Driver().get_template_definition() @mock.patch('magnum.common.clients.OpenStackClients') @mock.patch('magnum.drivers.heat.template_def.TemplateDefinition' @@ -325,7 +312,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_scale_manager = mock.MagicMock() mock_scale_manager.get_removal_nodes.return_value = removal_nodes - definition = k8sa_tdef.AtomicK8sTemplateDefinition() + definition = k8s_fcos_tdef.FCOSK8sTemplateDefinition() scale_params = definition.get_scale_params(mock_context, mock_cluster, node_count, @@ -342,8 +329,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): @mock.patch('magnum.common.neutron.get_fixed_network_name') @mock.patch('magnum.common.keystone.is_octavia_enabled') @mock.patch('magnum.common.clients.OpenStackClients') - @mock.patch('magnum.drivers.k8s_fedora_atomic_v1.template_def' - '.AtomicK8sTemplateDefinition.get_discovery_url') + @mock.patch('magnum.drivers.k8s_fedora_coreos_v1.template_def' + '.FCOSK8sTemplateDefinition.get_discovery_url') @mock.patch('magnum.drivers.heat.template_def.BaseTemplateDefinition' '.get_params') @mock.patch('magnum.drivers.heat.template_def.TemplateDefinition' @@ -575,7 +562,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): octavia_lb_healthcheck = mock_cluster.labels.get( 'octavia_lb_healthcheck') - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.get_params(mock_context, mock_cluster_template, mock_cluster) @@ -709,7 +696,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_cluster_template.volume_driver = 'cinder' mock_cluster.labels = {'cloud_provider_enabled': 'false'} - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises( exception.InvalidParameterValue, k8s_def.get_params, @@ -731,8 +718,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): @mock.patch('magnum.common.neutron.get_external_network_id') @mock.patch('magnum.common.keystone.is_octavia_enabled') @mock.patch('magnum.common.clients.OpenStackClients') - @mock.patch('magnum.drivers.k8s_fedora_atomic_v1.template_def' - '.AtomicK8sTemplateDefinition.get_discovery_url') + @mock.patch('magnum.drivers.k8s_fedora_coreos_v1.template_def' + '.FCOSK8sTemplateDefinition.get_discovery_url') @mock.patch('magnum.drivers.heat.template_def.BaseTemplateDefinition' '.get_params') @mock.patch('magnum.drivers.heat.template_def.TemplateDefinition' @@ -777,7 +764,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_osc.cinder_region_name.return_value = 'RegionOne' mock_osc_class.return_value = mock_osc - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.get_params(mock_context, mock_cluster_template, mock_cluster) actual_params = mock_get_params.call_args[1]["extra_params"] @@ -793,8 +780,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): @mock.patch('magnum.common.neutron.get_subnet') @mock.patch('magnum.common.keystone.is_octavia_enabled') @mock.patch('magnum.common.clients.OpenStackClients') - @mock.patch('magnum.drivers.k8s_fedora_atomic_v1.template_def' - '.AtomicK8sTemplateDefinition.get_discovery_url') + @mock.patch('magnum.drivers.k8s_fedora_coreos_v1.template_def' + '.FCOSK8sTemplateDefinition.get_discovery_url') @mock.patch('magnum.drivers.heat.template_def.BaseTemplateDefinition' '.get_params') @mock.patch('magnum.drivers.heat.template_def.TemplateDefinition' @@ -837,7 +824,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_osc.cinder_region_name.return_value = 'RegionOne' mock_osc_class.return_value = mock_osc - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises( exception.InvalidParameterValue, @@ -850,8 +837,8 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): @mock.patch('magnum.common.neutron.get_subnet') @mock.patch('magnum.common.keystone.is_octavia_enabled') @mock.patch('magnum.common.clients.OpenStackClients') - @mock.patch('magnum.drivers.k8s_fedora_atomic_v1.template_def' - '.AtomicK8sTemplateDefinition.get_discovery_url') + @mock.patch('magnum.drivers.k8s_fedora_coreos_v1.template_def' + '.FCOSK8sTemplateDefinition.get_discovery_url') @mock.patch('magnum.drivers.heat.template_def.BaseTemplateDefinition' '.get_params') @mock.patch('magnum.drivers.heat.template_def.TemplateDefinition' @@ -894,7 +881,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_osc.cinder_region_name.return_value = 'RegionOne' mock_osc_class.return_value = mock_osc - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.get_params(mock_context, mock_cluster_template, mock_cluster) actual_params = mock_get_params.call_args[1]["extra_params"] @@ -1140,7 +1127,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): octavia_lb_healthcheck = mock_cluster.labels.get( 'octavia_lb_healthcheck') - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.get_params(mock_context, mock_cluster_template, mock_cluster) @@ -1282,14 +1269,14 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_resp.text = expected_result mock_get.return_value = mock_resp - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.validate_discovery_url('http://etcd/test', 1) @mock.patch('requests.get') def test_k8s_validate_discovery_url_fail(self, mock_get): mock_get.side_effect = req_exceptions.RequestException() - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises(exception.GetClusterSizeFailed, k8s_def.validate_discovery_url, 'http://etcd/test', 1) @@ -1300,7 +1287,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_resp.text = str('{"action":"get"}') mock_get.return_value = mock_resp - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises(exception.InvalidClusterDiscoveryURL, k8s_def.validate_discovery_url, 'http://etcd/test', 1) @@ -1313,7 +1300,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_resp.text = expected_result mock_get.return_value = mock_resp - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises(exception.InvalidClusterSize, k8s_def.validate_discovery_url, 'http://etcd/test', 5) @@ -1332,7 +1319,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_cluster.master_count = 10 mock_cluster.discovery_url = None - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() discovery_url = k8s_def.get_discovery_url(mock_cluster) mock_get.assert_called_once_with('http://etcd/test?size=10', @@ -1350,13 +1337,13 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): mock_cluster.master_count = 10 mock_cluster.discovery_url = None - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self.assertRaises(exception.GetDiscoveryUrlFailed, k8s_def.get_discovery_url, mock_cluster) def test_k8s_get_heat_param(self): - k8s_def = k8sa_tdef.AtomicK8sTemplateDefinition() + k8s_def = k8s_fcos_tdef.FCOSK8sTemplateDefinition() k8s_def.add_nodegroup_params(self.mock_cluster) heat_param = k8s_def.get_heat_param(nodegroup_attr='node_count', @@ -1378,7 +1365,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): self.assertRaises( exception.InvalidDiscoveryURL, - k8sa_tdef.AtomicK8sTemplateDefinition().get_discovery_url, + k8s_fcos_tdef.FCOSK8sTemplateDefinition().get_discovery_url, fake_cluster) def _test_update_outputs_api_address(self, template_definition, @@ -1412,7 +1399,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): 'port': port, } - template_definition = k8sa_tdef.AtomicK8sTemplateDefinition() + template_definition = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self._test_update_outputs_api_address(template_definition, params) def test_update_k8s_outputs_if_cluster_template_is_secure(self): @@ -1424,7 +1411,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): 'address': address, 'port': port, } - template_definition = k8sa_tdef.AtomicK8sTemplateDefinition() + template_definition = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self._test_update_outputs_api_address(template_definition, params, tls=False) @@ -1457,7 +1444,7 @@ class AtomicK8sTemplateDefinitionTestCase(BaseK8sTemplateDefinitionTestCase): 'port': port, } - template_definition = k8sa_tdef.AtomicK8sTemplateDefinition() + template_definition = k8s_fcos_tdef.FCOSK8sTemplateDefinition() self._test_update_outputs_none_api_address(template_definition, params) def test_update_outputs_master_address(self): diff --git a/releasenotes/notes/drop-fedora-atomic-driver-76da9f0ea0cf20bb.yaml b/releasenotes/notes/drop-fedora-atomic-driver-76da9f0ea0cf20bb.yaml new file mode 100644 index 0000000000..83066c6543 --- /dev/null +++ b/releasenotes/notes/drop-fedora-atomic-driver-76da9f0ea0cf20bb.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + ``k8s_fedora_atomic_v1`` driver has been dropped. diff --git a/setup.cfg b/setup.cfg index a396918451..dd61784c2a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,7 +51,6 @@ oslo.policy.policies = magnum = magnum.common.policies:list_rules magnum.drivers = - k8s_fedora_atomic_v1 = magnum.drivers.k8s_fedora_atomic_v1.driver:Driver k8s_fedora_coreos_v1 = magnum.drivers.k8s_fedora_coreos_v1.driver:Driver magnum.database.migration_backend =