sshpiper/plugin/kubernetes/update-codegen.sh
Boshi Lian 706a36b40e
feat: Enhance PipeSpec and FromSpec with AuthorizedKeysSecret (#581)
* feat: Enhance PipeSpec and FromSpec with AuthorizedKeysSecret

- Added AuthorizedKeysSecret field to FromSpec for referencing Kubernetes secrets.
- Updated deepcopy functions to handle new AuthorizedKeysSecret field.
- Modified CRD definition to include the new private_key_secret field.
- Refactored fake client and lister implementations to support new fields.
- Introduced shared informers and listers for Pipe resources.
- Updated code generation scripts to reflect changes in API structure.

* refactor: Rename private_key_secret to authorized_keys_secret in CRD schema

* feat: Add support for authorized_keys from secret in skel and update k8sworkload.yaml

* feat: Enhance authorized keys handling to include secret name check

* Update plugin/kubernetes/skel.go

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-05-25 03:48:17 -07:00

30 lines
No EOL
689 B
Bash
Executable file

#!/usr/bin/env bash
set -o errexit
set -o nounset
set -o pipefail
go mod vendor
SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")
REPO_ROOT=$(realpath "${SCRIPT_ROOT}/../../")
CODEGEN_PKG=${REPO_ROOT}/vendor/k8s.io/code-generator
THIS_PKG="github.com/tg123/sshpiper/plugin/kubernetes"
source "${CODEGEN_PKG}/kube_codegen.sh"
kube::codegen::gen_helpers \
--boilerplate /dev/null \
"${SCRIPT_ROOT}"
kube::codegen::gen_register \
--boilerplate /dev/null \
"${SCRIPT_ROOT}"
kube::codegen::gen_client \
--with-watch \
--output-dir "${SCRIPT_ROOT}/generated" \
--output-pkg "${THIS_PKG}/generated" \
--boilerplate /dev/null \
"${SCRIPT_ROOT}/apis"