Skip to content

Commit 66fcea7

Browse files
authored
Merge pull request #1724 from fluxcd/fix-codegen
fix: fix codegen script and update generated code
2 parents 9bfc531 + 398fc90 commit 66fcea7

38 files changed

+144
-124
lines changed

hack/update-codegen.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,16 @@ mkdir -p "${TEMP_DIR}/${PACKAGE_PATH_BASE}/pkg/client/informers" \
3434
# Ensure we can execute.
3535
chmod +x ${CODEGEN_PKG}/kube_codegen.sh
3636

37-
source ${CODEGEN_PKG}/kube_codegen.sh kube::codegen::gen_client \
38-
--output-dir "${TEMP_DIR}" \
37+
source ${CODEGEN_PKG}/kube_codegen.sh
38+
39+
kube::codegen::gen_client \
40+
--output-dir "${TEMP_DIR}/${PACKAGE_PATH_BASE}/pkg/client" \
3941
--output-pkg "${PACKAGE_PATH_BASE}/pkg/client" \
4042
--with-watch \
4143
--boilerplate "${SCRIPT_ROOT}/hack/boilerplate.go.txt" \
42-
./pkgs/apis
44+
./pkg/apis
4345

44-
ls -lha $TEMP_DIR
46+
tree $TEMP_DIR/${PACKAGE_PATH_BASE/pkg/client}/
4547

4648
# Copy everything back.
4749
cp -r "${TEMP_DIR}/${PACKAGE_PATH_BASE}/." "${SCRIPT_ROOT}/"

pkg/apis/gloo/register.go

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package gloo
22

33
const (
4-
GlooGroupName = "gloo.solo.io"
5-
GatewayGroupName = "gateway.solo.io"
4+
GlooGroupName = "gloo.solo.io"
65
)
File renamed without changes.
File renamed without changes.

pkg/apis/gloo/gloo/v1/types.go pkg/apis/gloo/v1/types.go

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package v1
22

33
import (
4-
v1 "github.com/fluxcd/flagger/pkg/apis/gloo/gateway/v1"
54
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
65
)
76

@@ -44,7 +43,7 @@ type UpstreamSslConfig struct {
4443

4544
/** SSLSecrets -- only one of these should be set */
4645
*UpstreamSslConfig_Sds `json:"sds,omitempty"`
47-
SecretRef *v1.ResourceRef `json:"secretRef,omitempty"`
46+
SecretRef *ResourceRef `json:"secretRef,omitempty"`
4847
*UpstreamSslConfig_SslFiles `json:"sslFiles,omitempty"`
4948
}
5049

@@ -139,3 +138,9 @@ type UpstreamList struct {
139138

140139
Items []Upstream `json:"items"`
141140
}
141+
142+
// ResourceRef references resources across namespaces
143+
type ResourceRef struct {
144+
Name string `json:"name,omitempty"`
145+
Namespace string `json:"namespace,omitempty"`
146+
}

pkg/apis/gloo/gloo/v1/zz_generated.deepcopy.go pkg/apis/gloo/v1/zz_generated.deepcopy.go

+17-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/apis/gloogateway/register.go

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
package gloogateway
2+
3+
const (
4+
GatewayGroupName = "gateway.solo.io"
5+
)
File renamed without changes.

pkg/apis/gloo/gateway/v1/register.go pkg/apis/gloogateway/v1/register.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
package v1
22

33
import (
4-
"github.com/fluxcd/flagger/pkg/apis/gloo"
4+
"github.com/fluxcd/flagger/pkg/apis/gloogateway"
55
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
66
"k8s.io/apimachinery/pkg/runtime"
77
"k8s.io/apimachinery/pkg/runtime/schema"
88
)
99

1010
// SchemeGroupVersion is group version used to register these objects
11-
var SchemeGroupVersion = schema.GroupVersion{Group: gloo.GatewayGroupName, Version: "v1"}
11+
var SchemeGroupVersion = schema.GroupVersion{Group: gloogateway.GatewayGroupName, Version: "v1"}
1212

1313
// Kind takes an unqualified kind and returns back a Group qualified GroupKind
1414
func Kind(kind string) schema.GroupKind {
File renamed without changes.

pkg/client/clientset/versioned/clientset.go

+28-28
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/fake/clientset_generated.go

+15-15
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/client/clientset/versioned/fake/register.go

+5-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)