Skip to content

Commit

Permalink
Normalizing format of annotations and markers
Browse files Browse the repository at this point in the history
Signed-off-by: Jiri Podivin <[email protected]>
  • Loading branch information
jpodivin committed Sep 6, 2024
1 parent 83185a9 commit a36bcdc
Show file tree
Hide file tree
Showing 18 changed files with 200 additions and 205 deletions.
16 changes: 8 additions & 8 deletions apis/client/v1beta1/openstackclient_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ type OpenStackClientSpecCore struct {
NodeSelector map[string]string `json:"nodeSelector,omitempty"`

// +kubebuilder:validation:Optional
//+operator-sdk:csv:customresourcedefinitions:type=spec
// +operator-sdk:csv:customresourcedefinitions:type=spec
// Secret containing any CA certificates which should be added to deployment pods
tls.Ca `json:",inline"`
}
Expand All @@ -70,12 +70,12 @@ type OpenStackClientStatus struct {
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}

//+kubebuilder:object:root=true
//+kubebuilder:subresource:status
//+operator-sdk:csv:customresourcedefinitions:displayName="OpenStack Client"
//+kubebuilder:resource:shortName=osclient;osclients
//+kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
//+kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"
// +kubebuilder:object:root=true
// +kubebuilder:subresource:status
// +operator-sdk:csv:customresourcedefinitions:displayName="OpenStack Client"
// +kubebuilder:resource:shortName=osclient;osclients
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=".status.conditions[0].status",description="Status"
// +kubebuilder:printcolumn:name="Message",type="string",JSONPath=".status.conditions[0].message",description="Message"

// OpenStackClient is the Schema for the openstackclients API
type OpenStackClient struct {
Expand All @@ -86,7 +86,7 @@ type OpenStackClient struct {
Status OpenStackClientStatus `json:"status,omitempty"`
}

//+kubebuilder:object:root=true
// +kubebuilder:object:root=true

// OpenStackClientList contains a list of OpenStackClient
type OpenStackClientList struct {
Expand Down
4 changes: 2 additions & 2 deletions apis/client/v1beta1/openstackclient_webhook.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func (r *OpenStackClient) SetupWebhookWithManager(mgr ctrl.Manager) error {
Complete()
}

//+kubebuilder:webhook:path=/mutate-client-openstack-org-v1beta1-openstackclient,mutating=true,failurePolicy=fail,sideEffects=None,groups=client.openstack.org,resources=openstackclients,verbs=create;update,versions=v1beta1,name=mopenstackclient.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/mutate-client-openstack-org-v1beta1-openstackclient,mutating=true,failurePolicy=fail,sideEffects=None,groups=client.openstack.org,resources=openstackclients,verbs=create;update,versions=v1beta1,name=mopenstackclient.kb.io,admissionReviewVersions=v1

var _ webhook.Defaulter = &OpenStackClient{}

Expand All @@ -69,7 +69,7 @@ func (spec *OpenStackClientSpec) Default() {
}

// TODO(user): change verbs to "verbs=create;update;delete" if you want to enable deletion validation.
//+kubebuilder:webhook:path=/validate-client-openstack-org-v1beta1-openstackclient,mutating=false,failurePolicy=fail,sideEffects=None,groups=client.openstack.org,resources=openstackclients,verbs=create;update,versions=v1beta1,name=vopenstackclient.kb.io,admissionReviewVersions=v1
// +kubebuilder:webhook:path=/validate-client-openstack-org-v1beta1-openstackclient,mutating=false,failurePolicy=fail,sideEffects=None,groups=client.openstack.org,resources=openstackclients,verbs=create;update,versions=v1beta1,name=vopenstackclient.kb.io,admissionReviewVersions=v1

var _ webhook.Validator = &OpenStackClient{}

Expand Down
6 changes: 3 additions & 3 deletions apis/client/v1beta1/webhook_suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ import (
admissionv1beta1 "k8s.io/api/admission/v1beta1"
kscheme "k8s.io/client-go/kubernetes/scheme"

//+kubebuilder:scaffold:imports
// +kubebuilder:scaffold:imports
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/client-go/rest"
ctrl "sigs.k8s.io/controller-runtime"
Expand Down Expand Up @@ -85,7 +85,7 @@ var _ = BeforeSuite(func() {
err = admissionv1beta1.AddToScheme(scheme)
Expect(err).NotTo(HaveOccurred())

//+kubebuilder:scaffold:scheme
// +kubebuilder:scaffold:scheme

k8sClient, err = client.New(cfg, client.Options{Scheme: scheme})
Expect(err).NotTo(HaveOccurred())
Expand Down Expand Up @@ -114,7 +114,7 @@ var _ = BeforeSuite(func() {
err = (&OpenStackClient{}).SetupWebhookWithManager(mgr)
Expect(err).NotTo(HaveOccurred())

//+kubebuilder:scaffold:webhook
// +kubebuilder:scaffold:webhook

go func() {
defer GinkgoRecover()
Expand Down
Loading

0 comments on commit a36bcdc

Please sign in to comment.