From deb81ab95a3ce4f5e4649878fa46a0c1aa31c1e1 Mon Sep 17 00:00:00 2001 From: David Negreira Date: Wed, 15 May 2024 08:35:08 +0000 Subject: [PATCH] Fix k8s deployment Bring k8s deployment up to date with relationships and integrations Closes: #186 --- kubernetes/pipeline/02configure | 1 + overlays/kubernetes/k8s-lb.yaml | 5 ++--- overlays/kubernetes/k8s-openstack-cloud-controller.yaml | 7 +++++++ overlays/kubernetes/k8s-openstack-integrator.yaml | 4 +--- 4 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 overlays/kubernetes/k8s-openstack-cloud-controller.yaml diff --git a/kubernetes/pipeline/02configure b/kubernetes/pipeline/02configure index 88866a7c..2a61544d 100644 --- a/kubernetes/pipeline/02configure +++ b/kubernetes/pipeline/02configure @@ -60,6 +60,7 @@ fi # need min 2.7 if ! is_hyperconverged; then MOD_OVERLAYS+=( "kubernetes/k8s-openstack-integrator.yaml" ) + MOD_OVERLAYS+=( "kubernetes/k8s-openstack-cloud-controller.yaml" ) if ! has_opt --no-trust && [[ ! "$JUJU_VERSION" < "2.7" ]]; then MOD_OVERLAYS+=( "kubernetes/k8s-openstack-integrator-trust.yaml" ) JUJU_DEPLOY_OPTS=" --trust" diff --git a/overlays/kubernetes/k8s-lb.yaml b/overlays/kubernetes/k8s-lb.yaml index 86a4ffd1..e1be2977 100644 --- a/overlays/kubernetes/k8s-lb.yaml +++ b/overlays/kubernetes/k8s-lb.yaml @@ -5,6 +5,5 @@ applications: expose: true num_units: __NUM_K8S_LB_UNITS__ relations: - - [ 'kubernetes-control-plane:kube-api-endpoint', 'kubeapi-load-balancer:apiserver' ] - - [ 'kubernetes-control-plane:loadbalancer', 'kubeapi-load-balancer:loadbalancer' ] - - [ 'kubernetes-worker:kube-api-endpoint', 'kubeapi-load-balancer:website' ] + - [ 'kubernetes-control-plane:loadbalancer-external', 'kubeapi-load-balancer:lb-consumers' ] + - [ 'kubernetes-control-plane:loadbalancer-internal', 'kubeapi-load-balancer:lb-consumers' ] diff --git a/overlays/kubernetes/k8s-openstack-cloud-controller.yaml b/overlays/kubernetes/k8s-openstack-cloud-controller.yaml new file mode 100644 index 00000000..1c3177a3 --- /dev/null +++ b/overlays/kubernetes/k8s-openstack-cloud-controller.yaml @@ -0,0 +1,7 @@ +applications: + openstack-cloud-controller: + charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__openstack-cloud-controller +relations: + - [openstack-cloud-controller:certificates, easyrsa:client] + - [openstack-cloud-controller:kube-control, kubernetes-control-plane:kube-control] + - [openstack-cloud-controller:external-cloud-provider, kubernetes-control-plane:external-cloud-provider] diff --git a/overlays/kubernetes/k8s-openstack-integrator.yaml b/overlays/kubernetes/k8s-openstack-integrator.yaml index baf24288..2423e0fe 100644 --- a/overlays/kubernetes/k8s-openstack-integrator.yaml +++ b/overlays/kubernetes/k8s-openstack-integrator.yaml @@ -1,8 +1,6 @@ applications: openstack-integrator: charm: __CHARM_STORE____CHARM_CS_NS____CHARM_CH_PREFIX__openstack-integrator - constraints: mem=1G num_units: 1 relations: - - [ 'openstack-integrator:clients', 'kubernetes-control-plane:openstack' ] - - [ 'openstack-integrator:clients', 'kubernetes-worker:openstack' ] + - [ 'openstack-integrator:clients', 'openstack-cloud-controller:openstack']