Skip to content

Commit 10aacc0

Browse files
committed
Platform engineering example: bitnamilegacy images, steps fixes; fix kubeconfig retriever
- steps.txt: add step to copy kubeplus-saas-provider.json into example dir - custom-mysql-1.0-10.1.0.tgz: use bitnamilegacy images so MySQL pods pull - kubeconfigretriever.py: single-quote jsonpath, handle double-encoded ConfigMap, guard dict access
1 parent 2eaaf23 commit 10aacc0

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed
Binary file not shown.

examples/multitenancy/platform-engineering/steps.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ Platform Engineering team
3232
$ helm install kubeplus "https://github.com/cloud-ark/operatorcharts/blob/master/kubeplus-chart-4.2.0.tgz?raw=true" --kubeconfig=kubeplus-saas-provider.json
3333
- Wait till KubePlus Pod is Running
3434
$ kubectl get pods -A
35+
- Copy the provider kubeconfig into this directory so the commands below work (run from this directory):
36+
$ cp ../../../kubeplus-saas-provider.json .
3537

3638
4. Create CustomMysqlService API wrapping the Helm chart:
3739
- Check custom-mysql-service-composition-localchart.yaml. Notice that we are specifying our custom mysql chart

plugins/kubeconfigretriever.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ def retrieve_kubeconfig(self, serverURL, kubeconfigFor, kubeconfig):
1111

1212
kubeplusNS = self.get_kubeplus_namespace(kubeconfig)
1313
if kubeconfigFor == 'provider':
14-
cmd = "kubectl get configmaps kubeplus-saas-provider -n " + kubeplusNS + r" -o jsonpath=\"{.data.kubeplus-saas-provider\.json}\""
14+
cmd = "kubectl get configmaps kubeplus-saas-provider -n " + kubeplusNS + r" -o jsonpath='{.data.kubeplus-saas-provider\.json}'"
1515
if kubeconfigFor == 'consumer':
16-
cmd = "kubectl get configmaps kubeplus-saas-consumer-kubeconfig -n " + kubeplusNS + r" -o jsonpath=\"{.data.kubeplus-saas-consumer\.json}\""
16+
cmd = "kubectl get configmaps kubeplus-saas-consumer-kubeconfig -n " + kubeplusNS + r" -o jsonpath='{.data.kubeplus-saas-consumer\.json}'"
1717

1818
#kubeconfigParts = kubeconfig.split("=")
1919
#kubeconfigPath = kubeconfigParts[1].strip()

0 commit comments

Comments
 (0)