Skip to content

Fix platform engineering example and kubeconfig retriever#1452

Merged
devdattakulkarni merged 4 commits intocloud-ark:masterfrom
anniegracehu:fix-kubeconfig-retriever
Feb 9, 2026
Merged

Fix platform engineering example and kubeconfig retriever#1452
devdattakulkarni merged 4 commits intocloud-ark:masterfrom
anniegracehu:fix-kubeconfig-retriever

Conversation

@anniegracehu
Copy link
Copy Markdown
Collaborator

@anniegracehu anniegracehu commented Feb 2, 2026

Summary

Fixes the platform engineering (Custom MySQL) example and the consumer kubeconfig retrieval plugin so the example runs end-to-end.

Changes

plugins/kubeconfigretriever.py

  • Use single quotes for the jsonpath argument so the shell does not alter it and kubectl returns the ConfigMap value (fixes empty output / "Expecting value: line 1 column 1").
  • If the ConfigMap value is double-encoded JSON, parse it again so we get a dict (fixes TypeError: string indices must be integers, not 'str').
  • Only read/update and print the kubeconfig when the parsed value is a dict, so we do not crash on bad or empty output.

Platform engineering example

  • Bitnami images: Bitnami moved free images from docker.io/bitnami to docker.io/bitnamilegacy. The custom MySQL chart (and packaged tgz) now use bitnamilegacy/mysql, bitnamilegacy/os-shell, and bitnamilegacy/mysqld-exporter in charts/mysql/values.yaml so pods can pull images.
  • steps.txt: Add a step to copy kubeplus-saas-provider.json into the example directory before step 4 so the following commands work without path prefixes.

Testing

  • Ran through platform engineering steps (upload chart, create ResourceComposition, retrieve consumer kubeconfig, create CustomMysqlService instance).
  • Confirmed MySQL pod runs and kubectl appresources, applogs, and metrics work.

@anniegracehu anniegracehu self-assigned this Feb 2, 2026
@anniegracehu anniegracehu changed the title Fix kubeconfigretriever: raw string for jsonpath, handle double-encod… Fix platform engineering example and kubeconfig retriever Feb 3, 2026
…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
@anniegracehu anniegracehu force-pushed the fix-kubeconfig-retriever branch from f2601f2 to 10aacc0 Compare February 3, 2026 04:57
@devdattakulkarni
Copy link
Copy Markdown
Contributor

Nice!!
You mentioned above that unpackaged chart is also included. But I don't see it in the set of committed files.

@anniegracehu
Copy link
Copy Markdown
Collaborator Author

Nice!! You mentioned above that unpackaged chart is also included. But I don't see it in the set of committed files.

Yes, I realized it was too many files (around 60) so we will only have the packaged chart for now

@anniegracehu anniegracehu marked this pull request as ready for review February 3, 2026 17:20
@anniegracehu
Copy link
Copy Markdown
Collaborator Author

I have removed some comments in plugins/kubeconfigretriever.py

@devdattakulkarni
Copy link
Copy Markdown
Contributor

Looks good!

@devdattakulkarni devdattakulkarni merged commit 1e78008 into cloud-ark:master Feb 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants