fix codegen to support both apis

This commit is contained in:
Felix Kunde 2021-12-15 10:48:49 +01:00
parent 7079d0ef80
commit dfec6fd6b0
3 changed files with 5 additions and 2 deletions

View File

@ -17,7 +17,7 @@ trap "cleanup" EXIT SIGINT
bash "${CODEGEN_PKG}/generate-groups.sh" all \
"${OPERATOR_PACKAGE_ROOT}/pkg/generated" "${OPERATOR_PACKAGE_ROOT}/pkg/apis" \
"zalando.org:v1alpha1" \
"acid.zalan.do:v1 zalando.org:v1alpha1" \
--go-header-file "${SCRIPT_ROOT}"/hack/custom-boilerplate.go.txt
cp -r "${OPERATOR_PACKAGE_ROOT}"/pkg/* "${TARGET_CODE_DIR}"

View File

@ -80,6 +80,9 @@ func NewForConfig(c *rest.Config) (*Clientset, error) {
var cs Clientset
var err error
cs.acidV1, err = acidv1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err
}
cs.zalandoV1alpha1, err = zalandov1alpha1.NewForConfig(&configShallowCopy)
if err != nil {
return nil, err