Skip to content

Commit

Permalink
Merge pull request #284 from uselagoon/v1beta1-unserved
Browse files Browse the repository at this point in the history
chore: add v1beta1 api in unserved state
  • Loading branch information
shreddedbacon authored Mar 7, 2025
2 parents 91ffc6c + fcf89c9 commit fe9e832
Show file tree
Hide file tree
Showing 7 changed files with 594 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/lagoon/v1beta1/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Deprecated and removed

This API version is deprecated and removed. It is only retained to ensure that CRD updates can proceed without having to delete and recreate the CRD entirely.

This may change in the future with how we handle CRD updates, but for now do not use this API version.
35 changes: 35 additions & 0 deletions api/lagoon/v1beta1/groupversion_info.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

// Package v1beta1 contains API Schema definitions for the lagoon v1beta1 API group
// +kubebuilder:object:generate=true
// +groupName=crd.lagoon.sh
package v1beta1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
"sigs.k8s.io/controller-runtime/pkg/scheme"
)

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "crd.lagoon.sh", Version: "v1beta1"}

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

// AddToScheme adds the types in this group-version to the given scheme.
AddToScheme = SchemeBuilder.AddToScheme
)
64 changes: 64 additions & 0 deletions api/lagoon/v1beta1/lagoonbuild_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1

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

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.phase`,description="Status of the LagoonBuild"
// +kubebuilder:printcolumn:name="BuildStep",type="string",JSONPath=`.status.conditions[?(@.type == "BuildStep")].reason`,description="The build step of the LagoonBuild"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

// LagoonBuild is the Schema for the lagoonbuilds API
type LagoonBuild struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

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

// +kubebuilder:object:root=true

// LagoonBuildList contains a list of LagoonBuild
type LagoonBuildList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LagoonBuild `json:"items"`
}

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// LagoonBuildSpec defines the desired state of LagoonBuild
type LagoonBuildSpec struct {
}

// LagoonBuildStatus defines the observed state of LagoonBuild
type LagoonBuildStatus struct {
// Conditions provide a standard mechanism for higher-level status reporting from a controller.
// They are an extension mechanism which allows tools and other controllers to collect summary information about
// resources without needing to understand resource-specific status details.
Conditions []metav1.Condition `json:"conditions,omitempty"`
Phase string `json:"phase,omitempty"`
}

func init() {
SchemeBuilder.Register(&LagoonBuild{}, &LagoonBuildList{})
}
63 changes: 63 additions & 0 deletions api/lagoon/v1beta1/lagoontask_types.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1beta1

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

// EDIT THIS FILE! THIS IS SCAFFOLDING FOR YOU TO OWN!
// NOTE: json tags are required. Any new fields you add must have json tags for the fields to be serialized.

// +kubebuilder:object:root=true
// +kubebuilder:unservedversion
// +kubebuilder:printcolumn:name="Status",type="string",JSONPath=`.status.phase`,description="Status of the LagoonTask"
// +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"

// LagoonTask is the Schema for the lagoontasks API
type LagoonTask struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

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

// +kubebuilder:object:root=true

// LagoonTaskList contains a list of LagoonTask
type LagoonTaskList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []LagoonTask `json:"items"`
}

// LagoonTaskSpec defines the desired state of LagoonTask
type LagoonTaskSpec struct {
}

// LagoonTaskStatus defines the observed state of LagoonTask
type LagoonTaskStatus struct {
// Conditions provide a standard mechanism for higher-level status reporting from a controller.
// They are an extension mechanism which allows tools and other controllers to collect summary information about
// resources without needing to understand resource-specific status details.
Conditions []metav1.Condition `json:"conditions,omitempty"`
Phase string `json:"phase,omitempty"`
}

func init() {
SchemeBuilder.Register(&LagoonTask{}, &LagoonTaskList{})
}
217 changes: 217 additions & 0 deletions api/lagoon/v1beta1/zz_generated.deepcopy.go

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

Loading

0 comments on commit fe9e832

Please sign in to comment.