mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-06 13:36:54 +00:00
Split the config CRDs into two API groups.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
@@ -86,6 +86,8 @@ EOF
|
||||
# Make the generated client code its own Go module.
|
||||
echo "generating ${OUTPUT_DIR}/client/go.mod..."
|
||||
mkdir client
|
||||
mkdir client/concierge
|
||||
mkdir client/supervisor
|
||||
cat << EOF > "./client/go.mod"
|
||||
// This go.mod file is generated by ./hack/codegen.sh.
|
||||
module ${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client
|
||||
@@ -110,7 +112,7 @@ echo "generating API-related code for our public API groups..."
|
||||
deepcopy \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
"supervisor/config:v1alpha1 concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
--go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-api > |"
|
||||
)
|
||||
|
||||
@@ -119,12 +121,22 @@ echo "generating API-related code for our internal API groups..."
|
||||
(cd apis &&
|
||||
bash "${GOPATH}/src/k8s.io/code-generator/generate-internal-groups.sh" \
|
||||
deepcopy,defaulter,conversion,openapi \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/concierge" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
"concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
--go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-int-api > |"
|
||||
)
|
||||
(cd apis &&
|
||||
bash "${GOPATH}/src/k8s.io/code-generator/generate-internal-groups.sh" \
|
||||
deepcopy,defaulter,conversion,openapi \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/supervisor" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"supervisor/config:v1alpha1" \
|
||||
--go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-int-api > |"
|
||||
)
|
||||
|
||||
|
||||
# Tidy up the .../apis module
|
||||
echo "tidying ${OUTPUT_DIR}/apis/go.mod..."
|
||||
@@ -135,9 +147,17 @@ echo "generating client code for our public API groups..."
|
||||
(cd client &&
|
||||
bash "${GOPATH}/src/k8s.io/code-generator/generate-groups.sh" \
|
||||
client,lister,informer \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/concierge" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
"concierge/config:v1alpha1 concierge/authentication:v1alpha1 concierge/login:v1alpha1" \
|
||||
--go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-client > |"
|
||||
)
|
||||
(cd client &&
|
||||
bash "${GOPATH}/src/k8s.io/code-generator/generate-groups.sh" \
|
||||
client,lister,informer \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/client/supervisor" \
|
||||
"${BASE_PKG}/generated/${KUBE_MINOR_VERSION}/apis" \
|
||||
"supervisor/config:v1alpha1" \
|
||||
--go-header-file "${ROOT}/hack/boilerplate.go.txt" 2>&1 | sed "s|^|gen-client > |"
|
||||
)
|
||||
|
||||
@@ -156,6 +176,7 @@ crd-ref-docs \
|
||||
|
||||
# Generate CRD YAML
|
||||
(cd apis &&
|
||||
controller-gen paths=./config/v1alpha1 crd:trivialVersions=true output:crd:artifacts:config=../crds &&
|
||||
controller-gen paths=./supervisor/config/v1alpha1 crd:trivialVersions=true output:crd:artifacts:config=../crds &&
|
||||
controller-gen paths=./concierge/config/v1alpha1 crd:trivialVersions=true output:crd:artifacts:config=../crds &&
|
||||
controller-gen paths=./concierge/authentication/v1alpha1 crd:trivialVersions=true output:crd:artifacts:config=../crds
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user