Repository navigation
Add get-kubeconfig script - #21
Merged
Merged
Conversation
get-kubeconfig scriptget-kubeconfig script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add
get-kubecommand and package the repo scripts with uvWhat
get-kubecommand (src/ci_cd/get_kube.py): downloads an environment's kubeconfig from Proton Pass usingpass-cli.-p/--project, envCICD_PROJECT) is the Proton Pass vault, the environment name (-e/--environment, envCICD_ENVIRONMENT) is the item, and the item must have exactly one attachment: the kubeconfig.local.<environment>.kubeconfig.yaml, with spaces in the name replaced by_. Use-o/--output-path(envCICD_OUTPUT_PATH) to save it somewhere else.0600permissions (owner only), since it contains cluster credentials.pass-clinot installed, vault/item not found, wrong number of attachments,pass-clierror), it prints a singleERROR: …line and exits with code 1. Whenpass-cliitself fails, its error message is included.pyproject.toml,uv.lockand.python-versionare new, and the scripts are exposed as console scripts (git-clone-ref,get-kube).scripts/git-clone-ref.pymoved tosrc/ci_cd/git_clone_ref.py. Its code is unchanged apart from arequires-pythonline added to the inline script metadata.git-cloneaction: now runsuv run --project "$GITHUB_ACTION_PATH/.." git-clone-ref …instead of running the script by path.copy-git-clone-scriptaction: copies the script from its new location and still names itgit-clone-ref.py..gitignore: ignores*local*, so downloaded kubeconfigs never get committed.Usage
copy-git-clone-script: target-pathmust now be a directory, because the action writes${target-path}/git-clone-ref.py. Workflows that pass a full file path need updating.