Skip to content

Commit

Permalink
feat: mark v1alpha1 as deprecated (#212)
Browse files Browse the repository at this point in the history
We will mark `v1alpha1` as deprecated.

```bash
kubectl apply -f tmp/flux-dev-pool.yaml 
Warning: This version is deprecated. Use v1beta1 instead.
pool.garm-operator.mercedes-benz.com/flux created
```


![image](https://github.com/user-attachments/assets/aae41e4a-38e5-487f-a783-e1bd826fa88f)


Signed-off-by: Mario Constanti <[email protected]>

Signed-off-by: Mario Constanti <[email protected]>
  • Loading branch information
bavarianbidi authored Nov 19, 2024
1 parent 69fd88b commit c7c6046
Show file tree
Hide file tree
Showing 12 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/v1alpha1/enterprise_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type EnterpriseStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:resource:path=enterprises,scope=Namespaced,categories=garm,shortName=ent
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Enterprise ID"
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/image_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ type ImageStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:resource:path=images,scope=Namespaced,categories=garm
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:printcolumn:name="Tag",type=string,JSONPath=`.spec.tag`
//+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/organization_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ type OrganizationStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:resource:path=organizations,scope=Namespaced,categories=garm,shortName=org
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Organization ID"
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/pool_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (p *Pool) GetConditions() []metav1.Condition {
//+kubebuilder:subresource:status
//+kubebuilder:subresource:scale:specpath=.spec.minIdleRunners,statuspath=.status.longRunningIdleRunners,selectorpath=.status.selector
//+kubebuilder:resource:path=pools,scope=Namespaced,categories=garm
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:printcolumn:name="ID",type=string,JSONPath=`.status.id`
//+kubebuilder:printcolumn:name="MinIdleRunners",type=string,JSONPath=`.spec.minIdleRunners`
//+kubebuilder:printcolumn:name="MaxRunners",type=string,JSONPath=`.spec.maxRunners`
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/repository_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type RepositoryStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:resource:path=repositories,scope=Namespaced,categories=garm,shortName=repo
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Repository ID"
//+kubebuilder:printcolumn:name="Ready",type="string",JSONPath=".status.conditions[?(@.type=='Ready')].status"
Expand Down
1 change: 1 addition & 0 deletions api/v1alpha1/runner_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ type RunnerStatus struct {

//+kubebuilder:object:root=true
//+kubebuilder:resource:path=runners,scope=Namespaced,categories=garm,shortName=run
//+kubebuilder:deprecatedversion:warning=This version is deprecated. Use v1beta1 instead.
//+kubebuilder:subresource:status
//+kubebuilder:printcolumn:name="ID",type="string",JSONPath=".status.id",description="Runner ID"
//+kubebuilder:printcolumn:name="Pool",type="string",JSONPath=".status.poolId",description="Pool CR Name"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/garm-operator.mercedes-benz.com_images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/garm-operator.mercedes-benz.com_pools.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ spec:
jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down
2 changes: 2 additions & 0 deletions config/crd/bases/garm-operator.mercedes-benz.com_runners.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ spec:
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
deprecated: true
deprecationWarning: This version is deprecated. Use v1beta1 instead.
name: v1alpha1
schema:
openAPIV3Schema:
Expand Down

0 comments on commit c7c6046

Please sign in to comment.