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

Basic EtcdCluster custom resource (#9) #15

Merged
merged 1 commit into from
Mar 13, 2024
Merged

Basic EtcdCluster custom resource (#9) #15

merged 1 commit into from
Mar 13, 2024

Conversation

sircthulhu
Copy link
Member

Generated and wrote the most basic EtcdCluster custom resource.
See #9

Copy link
Collaborator

@lllamnyp lllamnyp left a comment

Choose a reason for hiding this comment

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

LGTM. Let's allow for future updates to the storage spec, but for v1alpha1 this should be fine.

@gaalw
Copy link

gaalw commented Mar 13, 2024

@sircthulhu What is the target artifact? Did you try to build it? What is the result?

@gecube gecube merged commit 756f1a2 into main Mar 13, 2024
@gecube gecube deleted the the-very-beginning branch March 13, 2024 09:33
}

// EtcdClusterSpec defines the desired state of EtcdCluster
type EtcdClusterSpec struct {
Copy link

@Allliksey4 Allliksey4 Mar 13, 2024

Choose a reason for hiding this comment

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

I think about renaming this type EtcdClusterSpec ->Spec. I read package name and understand, that this code has context about EtcdCluster.

I see:

type EtcdCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   Spec   `json:"spec,omitempty"`
	Status Status `json:"status,omitempty"`
}

Copy link
Member Author

Choose a reason for hiding this comment

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

Package name is v1alpha1. After adding other CRs there will be name conflicts.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@Allliksey4 sorry, would it be convenient for you to write in English (no worries if errors/typos, nobody will blame)

Copy link

@Allliksey4 Allliksey4 Mar 13, 2024

Choose a reason for hiding this comment

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

Thank you! I edited it

metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can remove this comment


var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "etcd.aenix.io.etcd.aenix.io", Version: "v1alpha1"}
Copy link
Member

Choose a reason for hiding this comment

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

Stange group here. Maybe it should be just etcd.aenix.io?

controller-gen.kubebuilder.io/version: v0.14.0
name: etcdclusters.etcd.aenix.io.etcd.aenix.io
spec:
group: etcd.aenix.io.etcd.aenix.io
Copy link
Member

Choose a reason for hiding this comment

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

Same strange group. It will be fixed after fix in source code

@sircthulhu sircthulhu mentioned this pull request Mar 13, 2024
sircthulhu added a commit that referenced this pull request Mar 13, 2024
Fixes from comments #15 
- Fix API group name for custom resources
- remove unnecessary comment lines
This was referenced Mar 13, 2024
@sircthulhu sircthulhu linked an issue Mar 15, 2024 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write basic etcd-operator spec
6 participants