Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename CatalogSource to Catalog #60

Merged
merged 7 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion cmd/manager/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func main() {
os.Exit(1)
}

if err = (&corecontrollers.CatalogSourceReconciler{
if err = (&corecontrollers.CatalogReconciler{
Client: mgr.GetClient(),
Scheme: mgr.GetScheme(),
Cfg: mgr.GetConfig(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@ kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.11.4
name: catalogsources.catalogd.operatorframework.io
name: catalogs.catalogd.operatorframework.io
spec:
group: catalogd.operatorframework.io
names:
kind: CatalogSource
listKind: CatalogSourceList
plural: catalogsources
singular: catalogsource
kind: Catalog
listKind: CatalogList
plural: catalogs
singular: catalog
scope: Cluster
versions:
- name: v1beta1
schema:
openAPIV3Schema:
description: CatalogSource is the Schema for the catalogsources API
description: Catalog is the Schema for the Catalogs API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
Expand All @@ -32,7 +32,7 @@ spec:
metadata:
type: object
spec:
description: CatalogSourceSpec defines the desired state of CatalogSource
description: CatalogSpec defines the desired state of Catalog
properties:
image:
description: Image is the Catalog image that contains Operators' metadata
Expand All @@ -49,10 +49,10 @@ spec:
- image
type: object
status:
description: CatalogSourceStatus defines the observed state of CatalogSource
description: CatalogStatus defines the observed state of Catalog
properties:
conditions:
description: Conditions store the status conditions of the CatalogSource
description: Conditions store the status conditions of the Catalog
instances
items:
description: "Condition contains details for one aspect of the current
Expand Down
2 changes: 1 addition & 1 deletion config/crd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
resources:
- bases/catalogd.operatorframework.io_bundlemetadata.yaml
- bases/catalogd.operatorframework.io_packages.yaml
- bases/catalogd.operatorframework.io_catalogsources.yaml
- bases/catalogd.operatorframework.io_catalogs.yaml
#+kubebuilder:scaffold:crdkustomizeresource
6 changes: 3 additions & 3 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ rules:
- apiGroups:
- catalogd.operatorframework.io
resources:
- catalogsources
- catalogs
verbs:
- create
- delete
Expand All @@ -54,13 +54,13 @@ rules:
- apiGroups:
- catalogd.operatorframework.io
resources:
- catalogsources/finalizers
- catalogs/finalizers
verbs:
- update
- apiGroups:
- catalogd.operatorframework.io
resources:
- catalogsources/status
- catalogs/status
verbs:
- get
- patch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
apiVersion: catalogd.operatorframework.io/v1beta1
kind: CatalogSource
kind: Catalog
metadata:
labels:
app.kubernetes.io/name: catalogsource
app.kubernetes.io/instance: catalogsource-sample
app.kubernetes.io/name: catalog
app.kubernetes.io/instance: catalog-sample
app.kubernetes.io/part-of: catalogd
app.kuberentes.io/managed-by: kustomize
app.kubernetes.io/created-by: catalogd
name: catalogsource-sample
name: catalog-sample
spec:
image: quay.io/operatorhubio/catalog:latest
pollingInterval: 45m
Original file line number Diff line number Diff line change
Expand Up @@ -31,27 +31,27 @@ const (
//+kubebuilder:resource:scope=Cluster
//+kubebuilder:subresource:status

// CatalogSource is the Schema for the catalogsources API
type CatalogSource struct {
// Catalog is the Schema for the Catalogs API
type Catalog struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec CatalogSourceSpec `json:"spec,omitempty"`
Status CatalogSourceStatus `json:"status,omitempty"`
Spec CatalogSpec `json:"spec,omitempty"`
Status CatalogStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true

// CatalogSourceList contains a list of CatalogSource
type CatalogSourceList struct {
// CatalogList contains a list of Catalog
type CatalogList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`

Items []CatalogSource `json:"items"`
Items []Catalog `json:"items"`
}

// CatalogSourceSpec defines the desired state of CatalogSource
type CatalogSourceSpec struct {
// CatalogSpec defines the desired state of Catalog
type CatalogSpec struct {

// Image is the Catalog image that contains Operators' metadata in the FBC format
// https://olm.operatorframework.io/docs/reference/file-based-catalogs/#docs
Expand All @@ -64,12 +64,12 @@ type CatalogSourceSpec struct {
PollingInterval *metav1.Duration `json:"pollingInterval,omitempty"`
}

// CatalogSourceStatus defines the observed state of CatalogSource
type CatalogSourceStatus struct {
// Conditions store the status conditions of the CatalogSource instances
// CatalogStatus defines the observed state of Catalog
type CatalogStatus struct {
// Conditions store the status conditions of the Catalog instances
Conditions []metav1.Condition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,1,rep,name=conditions"`
}

func init() {
SchemeBuilder.Register(&CatalogSource{}, &CatalogSourceList{})
SchemeBuilder.Register(&Catalog{}, &CatalogList{})
}
38 changes: 19 additions & 19 deletions pkg/apis/core/v1beta1/zz_generated.deepcopy.go

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

Loading
Loading