Azure / open-service-broker-azure

The Open Service Broker API Server for Azure Services
https://osba.sh
MIT License
248 stars 100 forks source link

extensions/v1beta1 is used >> deployment on k8s v1.16+ not possible #733

Open Herr-Sepp opened 4 years ago

Herr-Sepp commented 4 years ago

With Kubernetescluster running v1.16 and later it is not possible to deploy OSBA with Helm on Kubernetes:

helm install osba azure/open-service-broker-azure 
  --namespace osba
  --set azure.subscriptionId=$AZURE_SUBSCRIPTION_ID
  --set azure.tenantId=$env:AZURE_TENANT_ID
  --set azure.clientId=$env:AZURE_CLIENT_ID
  --set azure.clientSecret=$env:AZURE_CLIENT_SECRET
  --version 1.8.4

Error: unable to build kubernetes objects from release manifest: unable to recognize "": no matches for kind "Deployment" in version "extensions/v1beta1"

"extensions/v1beta1" was removed with v1.16

DaemonSet, Deployment, StatefulSet, and ReplicaSet (in the extensions/v1beta1 and apps/v1beta2 API groups) Migrate to use the apps/v1 API, available since v1.9. Existing persisted data can be retrieved/updated via the apps/v1 API

Please update your helm chart

Herr-Sepp commented 4 years ago

Changes nedded to run OBSA on a K8s Cluster 1.16 or higher:

Helm Chart (open-service-broker-azure)

/templates/deployment.yaml

Line1: apiVersion: extensions/v1beta1  >> apiVersion: apps/v1

and if you use the embedded redis:

/requirements.yaml

Line 3: version 0.10.0  >> version: 10.3.4

(no idea why this incredible old Redis chart (Redis 3.2) was used? But it is also not compatible with K8s 1.16 and later. Charts for Redis 3 and 4 are not updated, so you must use the newest Redis 5

BUT this new chart causes a bootcrashloop for OBSA because it can´t connect. So i edited chart 0.10.2 by hand to make it K8s 1.16 compatible.

please consider if you update OBSA to make i compatible with a maintained version von Redis

tapanhalani commented 4 years ago

Any updates on this? Is OSBA helm chart to be maintained and continued to be developed further? It would be great to get an idea if the chart is going to be actively maintained, and if so, when can we expect the updated helm chart for k8s 1.16+.

r-t-m commented 4 years ago

@Herr-Sepp probably you need to edit the service port value to use the latest external redis. It's working fine with the following values (you need to adjust this to your setup):

# partial config of values.yaml for helm chart

redis:
    embedded: false
    enableTls: false
    host: osba-redis-master # this shoud point to your external redis service
    port: 6379 # in case the default chart is used, this port should point to the service port number as osba chart has default for 6380
    redisPassword: <password>

In case someone want to use repo chart with k8s 1.16 and helm v3 and do not want to fork it, following script can be used as a helm post renderer to replace apiVersion extensions/v1beta1 to apiVersion: apps/v1

osba_upgrade.sh

#!/usr/bin/env bash

set -e

awk '/kind: Deployment/{sub(/extensions\/v1beta1/, "apps/v1", last)} NR>1{print last} {last=$0} END {print last}'

and install could be done with the next command: helm upgrade --install osba azure/open-service-broker-azure --namespace <namespace> --values <values to override the defaults> --post-renderer <script location>/osba_upgrade.sh