Commit Graph

26 Commits

Author SHA1 Message Date
Michal Nasiadka 5af49aa2fa Add support for choosing Octavia provider
Story: 2008805

Add support for:
* choosing Octavia provider
* setting octavia_lb_algorithm
* disabling Octavia healthcheck

Change-Id: I2d424fc2e2f8967e4b3007faedbc089f37126968
2022-05-03 09:32:24 +00:00
Feilong Wang 56583ac8fe Fix Cinder CSI
A regression issue introduced by [1], which is causing Cinder CSI pods
failed to start. This patch will fixed it.

[1] https://review.opendev.org/#/c/749101/

Change-Id: If9dd67672becb6def9f97afa7e60b2660cf5b27e
Task: 41097
Story: 2008250
2020-11-19 20:14:22 +00:00
Feilong Wang e17e6b8a60 Revert "Fix Cinder CSI"
This reverts commit 290d60a0aa.

We cannot do the copy in the Ignition stage, it's too early, unfortunately. We may have to fall back to the original way to put the copy in a script.

Change-Id: I5b6d1d3d7acfb640a20ecc7f8e1e954a7d3628e4
2020-11-09 09:33:03 +00:00
Feilong Wang 290d60a0aa Fix Cinder CSI
A regression issue introduced by [1], which is causing Cinder CSI pods
failed to start. This patch will fixed it.

[1] https://review.opendev.org/#/c/749101/

Task: 41097
Story: 2008250

Change-Id: I0e20bc3eb306af86d22f0ea9f770186bb88eaca5
2020-11-05 10:23:06 +00:00
Bharat Kunwar 799563eb61 Remove shebang from scripts
Without this, heat container agents using  kubectl version
1.18.x (e.g. ussuri-dev) fail because they do not have the correct
KUBECONFIG in the environment.

Task: 39938
Story: 2007591

Change-Id: Ifc212478ae09c658adeb6ba4c8e8afc8943e3977
2020-06-16 20:53:07 +00:00
Bharat Kunwar eebcc9b7a1 Fix k8s deployment when cluster_user_trust=False
At the moment, cluster deployment fails when cluster_user_trust=False.
This is because the entire SoftwareDeployment exits rather than a single
script fragment. This patch fixes this by scoping the remainder of the
script conditional on whether TRUST_ID is defined.

Finally, default `cloud_provider_enabled` to false when
`cluster_user_trust` is false. Raise an error when
`cloud_provider_enabled` is overridden to true when `cluster_user_trust`
is false. This ensures that the minion kubelet is correctly configured.

Change-Id: Ibd9270c87bfa5d2f490e2e226e33ca56696d9e81
Story: 2006531
Task: 36587
2019-09-20 03:49:03 +00:00
Bharat Kunwar e84cc4c975 Convert network UUID to name required for OCCM
Sometimes, the fixed_network value gets rendered as UUID. However OCCM's
internal-network-name requires the network name, it does not support
UUID. This patch introduces a new parameter called fixed_network_name
which converts fixed_network UUID to name if it is UUID-like.

Story: 2005333
Task: 36313

Change-Id: I3453bc0dbea285687d39c9782685cb1f2a3ecd39
2019-08-25 22:16:42 +00:00
Bharat Kunwar 9e815f6af4 Fix cloud-config file
This patch fixes bad generated cloud-config file due to missing double quotes.

As a result, kube-controller-manager and kubelet services fail to start.

This is a regression introduced in https://review.opendev.org/#/c/666625/.

Change-Id: I0e0a3786e084fc4d3aae3151791d79c3956d2e52
Task: 36192
Story: 2005333
2019-08-19 13:58:25 +00:00
Bharat Kunwar 425fb0fa32 Add network config to stabilise multi-NIC scenario
When there is more than one NIC attached to an instance, openstack cloud
provider returns a random InternalIP back to the host resulting in instability
with API server which only talks to a default interface.

This patch incorporates the changes made in
https://github.com/kubernetes/cloud-provider-openstack/pull/444 which enables
OpenStack Cloud Controller Manager (OCCM) to respect the
`internal-network-name` in cloud-config file which ensures that InternalIP
remains stable.

Uses a separate cloud-config file for OCCM to ensure in-tree Cinder volumes
remain compatible.

Change-Id: Idfa52ed2d512e7dc383a556371e896205dd542f9
Story: 2005333
Task: 30271
2019-07-29 09:07:26 +00:00
Feilong Wang 05c27f2d73 [k8s][fedora atomic] Rolling upgrade support
Rolling ugprade is an important feature for a managed k8s service,
at this stage, two user cases will be covered:

1. Upgrade base operating system
2. Upgrade k8s version

Known limitation: When doing operating system upgrade, there is no
chance to call kubectl drain to evict pods on that node.

Task: 30185
Story: 2002210

Change-Id: Ibbed59bc135969174a20e5243ff8464908801a23
2019-06-07 14:48:08 +12:00
Spyros Trigazis 24a6d89ab2 Revert "Specify internal network to improve stability in a multi-NIC scenario."
This reverts commit 97811ef541.

Please see comment in
https://review.openstack.org/#/c/648818/

Change-Id: I48b98b76fc4548290a7978521de5fb3d77a3a99a
2019-04-05 09:29:33 +00:00
Bharat Kunwar 97811ef541 Specify internal network to improve stability in a multi-NIC scenario.
When there is more than one NIC attached to an instance, openstack cloud
provider returns a random InternalIP back to the host resulting in instability
with API server which only talks to a default interface.

This patch incorporates the changes made in
https://github.com/kubernetes/cloud-provider-openstack/pull/444 which enables
OpenStack Cloud Controller Manager to respect the `internal-network-name` in
cloud-config file which ensures that InternalIP remains stable.

Story: 2005333
Task: 30271

Change-Id: I9e3ad459dd05753b53cb4ce75ee3aed649fef196
2019-03-30 07:57:27 +00:00
Lingxian Kong a941822c8e Support octavia-ingress-controller
- Add "octavia" as one of the "ingress_controller" options.
- Add label "octavia_ingress_controller_tag".
- Use external network ID in the heat templates.

Story: 2004838
Change-Id: I7d889a054cd5feb2eeef523b20607a6c7630d777
2019-01-31 14:49:32 +13:00
Jim Bach 6c61a1a949 k8s_fedora: Use external kubernetes/cloud-provider-openstack
* Use the external cloud-provider [0]
* Label master nodes
* Make the script the deploys the cloud-provider and clusterroles
  for the apiserver a SoftwareDeployment
* Rename kube_openstack_config to cloud-config,
  for cinder to workm the kubelet expects the cloud config name only
  like this. Keep a copy of kube_openstack_config for backwards
  compatibility.

Change-Id: Ife5558f1db4e581b64cc4a8ffead151f7b405702
Task: 22361
Story: 2002652
Co-Authored-By: Spyros Trigazis <spyridon.trigazis@cern.ch>
2018-12-19 10:56:47 +01:00
Andrei Ozerov a28e5609f9 Provide a region to the K8S Fedora Atomic config
Kubernetes should initialize its Global configuration for the OpenStack
provider with the region specified in the Heat stack.
This will allow user to create Magnum Kubernetes clusters in
multiregional OpenStack installation with different public endpoint for
services.

Task: 22576
Story: 2002728
Change-Id: I66820369b889e16445cad7a48cd0f458aae1c41f
2018-07-10 10:19:29 +03:00
Lingxian Kong 2cc57c5386 Use Octavia for LoadBalancer type service
In the OpenStack deployment with Octavia service enabled, the octavia
service should be used not only for master nodes high availability, but
also for k8s LoadBalancer type service implementation as well.

Change-Id: Ib61f59507510253794a4780a91e49aa6682c8039
Closes-Bug: #1770133
2018-05-30 15:36:24 +12:00
Spyros Trigazis d95ba4d1ff Run etcd and flanneld in a system container
In Fedora Atomic 27 etcd and flanneld are removed from the base image.
Install them as a system containers.

* update docker-storage configuration
* add etcd and flannel tags as labels

Change-Id: I2103c7c3d50f4b68ddc11abff72bc9e3f22839f3
Closes-Bug: #1735381
2018-02-22 12:30:27 +00:00
Spyros Trigazis 65dfb2009f Add openstack_ca_file configuration option
In the drivers section of magnum.conf add openstack_ca_file.
This file is expected to be a CA Certificate OR CA bundle
which will be passed on every node and it will be installed
on the host's CA bundle.

Update devstack plugin to use the ssl bundle if tls-proxy is
enabled.

Install the CA for drivers:
k8s_coreos_v1
k8s_fedora_atomic_v1
k8s_fedora_ironic_v1
mesos_ubuntu_v1
swarm_fedora_atomic_v1
swarm_fedora_atomic_v2

Add doc in troubleshooting-guide.

Add release notes.

Closes-Bug: #1580704
Partially-Implements: blueprint heat-agent
Change-Id: Id48fbea187da667a5e7334694c3ec17c8e2504db
2018-01-17 14:58:56 +00:00
chestack 048400bd4b Remove TENANT_NAME from /etc/sysconfig/heat-params
1. It will fail to create cluster if there is chinese in tenant name
2. TENANT_NAME is unnecessary after changing to trustee

this patch is for k8s_fedora_atomic and k8s_fedora_ironic

Change-Id: Ie072f183110ae95861fb3694a913a3a4526549fb
Close-Bug: #1711308
2017-08-23 16:40:48 +08:00
Jenkins 1964ef0f34 Merge "Move all kubernetes files in /etc/kubernetes" 2017-07-26 17:31:23 +00:00
Mathieu Velten 4a39ad699b Move all kubernetes files in /etc/kubernetes
Kubernetes uses cetificates, kubeconfig and the kubernetes openstack
cloud provider configuration from /srv/kubernetes and /etc/sysconfig.

The upstream kubernetes system containers used with atomic hosts
mounts /etc/kubernetes, we can unify the location of all kubernetes
configuration and also be able to use the upstream containers
unmodified.

Implements: blueprint run-kube-as-container

Change-Id: I9b2da390745836d9a66b7c8fc995a35cb74993e9
2017-07-26 10:51:27 +02:00
Markus Sommer 94d93177db Add Cinder-API-ver to k8s-cloud-provider config
Explicit API-version is required when communicating with cinder, since
kubernetes expects a return 200 but receives 300 wen version is not
specified.

Change-Id: I1202d85f8029a078c099eee105b421c9660393fc
Closes-Bug: #1704410
2017-07-14 17:28:27 +02:00
Mathieu Velten c0787b4e94 Fix usage of the trustee user in K8S Cinder plugin
Closes-Bug: #1672667
Change-Id: I702818777ea4664ecd560c4b7a02431c86988e17
2017-04-07 14:15:52 +02:00
yatinkarel eb495d469b Make k8s cloud config consistent
k8s cloud config in magnum uses Username/username, Password/password.
With this patch cloud config uses username and password which is
also consistent with k8s config examples.

Change-Id: I43beaf2b86a1598cec12a75f9aadba4c3d72ef83
2016-10-12 11:56:49 +05:30
Ton Ngo 324f4aca7d Fix K8s load balancer with LBaaS v1
Fix node name and auth_url

Update the url to Keystone v2 which has been changed.
The name of the node registered in the kube-apiserver
was also changed at some point to use the IP instead of the
Nova instance name as was done originally, and this
broke the Kubernetes plugin code.  Change the node name
back to the Nova instance name in the option
--hostname-override for kubelet.

Some update to the document.

With this patch, the load balancer works with Magnum Newton
and later, along with the image fedora-atomic-latest.
Important notes:
1. The current image has Kubernetes release 1.2 and this only
works with neutron LBaaS v1.  Support for LBaaS v2 requires
Kubernetes release 1.3 or later.  Magnum support for 1.3
is still in development.
2. LBaaS v1 has been removed in Newton and is only available
in Mitaka or by custom installation (likely requires some hacking).
This means to get the load balancer feature, you will want to
install Openstack Mitaka and Magnum Newton.

Change-Id: Ica9d92c8d7410bf30832005687ecce4a90ef6c58
Closes-Bug: #1524025
2016-09-26 16:01:08 +00:00
Spyros Trigazis 2c635692ae Split k8s atomic vm and ironic drivers
The 2 k8s atomic drivers we currently support are added to the
same driver. This breaks ironic support with the stevedore
work I'm currently doing.

With stevedore, we can choose only one driver based on the
server_type, os and coe. We won't be able to pick a driver and
then choose an implementation bases on server_type.

Partially-Implements: blueprint magnum-baremetal-full-support
Co-Authored-By: Spyros Trigazis <strigazi@gmail.com>
Change-Id: Ic1b8103551f48f85baa2ed9ff32d5b70b1fab84e
2016-09-09 18:10:08 +02:00