Removed image CRD, updated plugins

This commit is contained in:
Sylwia Brant
2021-02-05 13:28:30 +01:00
parent 021ebb4745
commit 77a79e8f97
10 changed files with 6 additions and 528 deletions
-49
View File
@@ -1,49 +0,0 @@
package v1alpha2
import metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
// JenkinsImageSpec defines the desired state of JenkinsImage
type JenkinsImageSpec struct {
BaseImage Image `json:"image"`
Plugins []JenkinsPlugin `json:"plugins"` // Plugins list
}
// Defines Jenkins Plugin structure
type JenkinsPlugin struct {
Name string `json:"name"`
Version string `json:"version,omitempty"`
}
// Defines Jenkins Plugin structure
type Image struct {
Name string `json:"name"`
Tag string `json:"version,omitempty"`
}
// JenkinsImageStatus defines the observed state of JenkinsImage
type JenkinsImageStatus struct {
Image string `json:"image,omitempty"`
MD5Sum string `json:"md5sum,omitempty"`
InstalledPlugins []JenkinsPlugin `json:"installedPlugins,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// JenkinsImage is the Schema for the jenkinsimages API
// +kubebuilder:subresource:status
// +kubebuilder:resource:path=jenkinsimages,scope=Namespaced
type JenkinsImage struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec JenkinsImageSpec `json:"spec,omitempty"`
Status JenkinsImageStatus `json:"status,omitempty"`
}
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
// JenkinsImageList contains a list of JenkinsImage
type JenkinsImageList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []JenkinsImage `json:"items"`
}
-1
View File
@@ -53,5 +53,4 @@ func JenkinsTypeMeta() metav1.TypeMeta {
func init() {
SchemeBuilder.Register(&Jenkins{}, &JenkinsList{})
SchemeBuilder.Register(&JenkinsImage{}, &JenkinsImageList{})
}
-130
View File
@@ -217,21 +217,6 @@ func (in *Handler) DeepCopy() *Handler {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Image) DeepCopyInto(out *Image) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image.
func (in *Image) DeepCopy() *Image {
if in == nil {
return nil
}
out := new(Image)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *Jenkins) DeepCopyInto(out *Jenkins) {
*out = *in
@@ -274,106 +259,6 @@ func (in *JenkinsAPISettings) DeepCopy() *JenkinsAPISettings {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsImage) DeepCopyInto(out *JenkinsImage) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ObjectMeta.DeepCopyInto(&out.ObjectMeta)
in.Spec.DeepCopyInto(&out.Spec)
in.Status.DeepCopyInto(&out.Status)
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsImage.
func (in *JenkinsImage) DeepCopy() *JenkinsImage {
if in == nil {
return nil
}
out := new(JenkinsImage)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *JenkinsImage) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsImageList) DeepCopyInto(out *JenkinsImageList) {
*out = *in
out.TypeMeta = in.TypeMeta
in.ListMeta.DeepCopyInto(&out.ListMeta)
if in.Items != nil {
in, out := &in.Items, &out.Items
*out = make([]JenkinsImage, len(*in))
for i := range *in {
(*in)[i].DeepCopyInto(&(*out)[i])
}
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsImageList.
func (in *JenkinsImageList) DeepCopy() *JenkinsImageList {
if in == nil {
return nil
}
out := new(JenkinsImageList)
in.DeepCopyInto(out)
return out
}
// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (in *JenkinsImageList) DeepCopyObject() runtime.Object {
if c := in.DeepCopy(); c != nil {
return c
}
return nil
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsImageSpec) DeepCopyInto(out *JenkinsImageSpec) {
*out = *in
out.BaseImage = in.BaseImage
if in.Plugins != nil {
in, out := &in.Plugins, &out.Plugins
*out = make([]JenkinsPlugin, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsImageSpec.
func (in *JenkinsImageSpec) DeepCopy() *JenkinsImageSpec {
if in == nil {
return nil
}
out := new(JenkinsImageSpec)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsImageStatus) DeepCopyInto(out *JenkinsImageStatus) {
*out = *in
if in.InstalledPlugins != nil {
in, out := &in.InstalledPlugins, &out.InstalledPlugins
*out = make([]JenkinsPlugin, len(*in))
copy(*out, *in)
}
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsImageStatus.
func (in *JenkinsImageStatus) DeepCopy() *JenkinsImageStatus {
if in == nil {
return nil
}
out := new(JenkinsImageStatus)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsList) DeepCopyInto(out *JenkinsList) {
*out = *in
@@ -483,21 +368,6 @@ func (in *JenkinsMaster) DeepCopy() *JenkinsMaster {
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsPlugin) DeepCopyInto(out *JenkinsPlugin) {
*out = *in
}
// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JenkinsPlugin.
func (in *JenkinsPlugin) DeepCopy() *JenkinsPlugin {
if in == nil {
return nil
}
out := new(JenkinsPlugin)
in.DeepCopyInto(out)
return out
}
// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (in *JenkinsSpec) DeepCopyInto(out *JenkinsSpec) {
*out = *in