Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ manifests: update-crds $(MANIFESTS) $(HELM) #EXHELP Generate OLMv1 manifests
$(HELM) template olmv1 helm/olmv1 --set "options.openshift.enabled=true" > /dev/null

.PHONY: generate
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations.
@find api cmd hack internal -name "zz_generated.deepcopy.go" -not -path "*/vendor/*" -delete # Need to delete the files for them to be generated properly
generate: $(CONTROLLER_GEN) #EXHELP Generate code containing DeepCopy, DeepCopyInto, DeepCopyObject, and ApplyConfiguration type implementations.
# Need to delete the files for them to be generated properly
@find api cmd hack internal -name "zz_generated.deepcopy.go" -not -path "*/vendor/*" -delete && rm -rf applyconfigurations
$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) applyconfiguration:headerFile="hack/boilerplate.go.txt" paths="./api/..."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @joelanford should all APIs that we have use applyconfigurations now?
OR just the specific one?

$(CONTROLLER_GEN) --load-build-tags=$(GO_BUILD_TAGS) object:headerFile="hack/boilerplate.go.txt" paths="./..."

.PHONY: verify
Expand Down
2 changes: 2 additions & 0 deletions api/v1/clustercatalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ const (
ReasonUserSpecifiedUnavailable = "UserSpecifiedUnavailable"
)

// +genclient
// +genclient:nonNamespaced
//+kubebuilder:object:root=true
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:subresource:status
Expand Down
2 changes: 2 additions & 0 deletions api/v1/clusterextension_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -537,6 +537,8 @@ type ClusterExtensionInstallStatus struct {
Bundle BundleMetadata `json:"bundle"`
}

// +genclient
// +genclient:nonNamespaced
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:subresource:status
Expand Down
2 changes: 2 additions & 0 deletions api/v1/clusterextensionrevision_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ type ClusterExtensionRevisionStatus struct {
Conditions []metav1.Condition `json:"conditions,omitempty"`
}

// +genclient
// +genclient:nonNamespaced
// +kubebuilder:object:root=true
// +kubebuilder:resource:scope=Cluster
// +kubebuilder:subresource:status
Expand Down
6 changes: 6 additions & 0 deletions api/v1/groupversion_info.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ limitations under the License.
// Package v1 contains API Schema definitions for the olm v1 API group
// +kubebuilder:object:generate=true
// +groupName=olm.operatorframework.io
// +kubebuilder:ac:generate=true
// +kubebuilder:ac:output:package=../../applyconfigurations
package v1

import (
Expand All @@ -28,6 +30,10 @@ var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "olm.operatorframework.io", Version: "v1"}

// SchemeGroupVersion is an alias for GroupVersion, required by the
// generated apply configuration code.
SchemeGroupVersion = GroupVersion
Comment on lines 31 to +35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does GroupVersion change at all after initialization, same with SchemeGroupVersion. Are these treated as constants?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assumed to be constant. If something changes it, I'd consider it a bug.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shame golang won't let you declare them as a constant.


// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

Expand Down
54 changes: 54 additions & 0 deletions applyconfigurations/api/v1/bundlemetadata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

232 changes: 232 additions & 0 deletions applyconfigurations/api/v1/catalogfilter.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading