From 67b25e319b736e7aa1137f966ad6dff14064c945 Mon Sep 17 00:00:00 2001 From: Marc Campbell Date: Fri, 8 Nov 2019 01:31:20 +0000 Subject: [PATCH] Updated from controller-gen --- ...troubleshoot.replicated.com_analyzers.yaml | 353 ++++++++++++++++++ ...roubleshoot.replicated.com_collectors.yaml | 14 + ...roubleshoot.replicated.com_preflights.yaml | 104 ++++++ config/crds/zz_generated.deepcopy.go | 82 +++- go.sum | 1 + pkg/analyze/deployment_status_test.go | 6 +- .../v1beta1/zz_generated.deepcopy.go | 2 +- 7 files changed, 557 insertions(+), 5 deletions(-) diff --git a/config/crds/troubleshoot.replicated.com_analyzers.yaml b/config/crds/troubleshoot.replicated.com_analyzers.yaml index abaa32faa..02113e4d5 100644 --- a/config/crds/troubleshoot.replicated.com_analyzers.yaml +++ b/config/crds/troubleshoot.replicated.com_analyzers.yaml @@ -390,6 +390,359 @@ spec: type: string type: object spec: + properties: + analyzers: + items: + properties: + clusterVersion: + properties: + checkName: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + type: object + customResourceDefinition: + properties: + checkName: + type: string + customResourceDefinitionName: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - customResourceDefinitionName + type: object + deploymentStatus: + properties: + checkName: + type: string + name: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - namespace + - name + type: object + imagePullSecret: + properties: + checkName: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + registryName: + type: string + required: + - outcomes + - registryName + type: object + ingress: + properties: + checkName: + type: string + ingressName: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - ingressName + - namespace + type: object + secret: + properties: + checkName: + type: string + key: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + secretName: + type: string + required: + - outcomes + - secretName + - namespace + type: object + statefulsetStatus: + properties: + checkName: + type: string + name: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - namespace + - name + type: object + storageClass: + properties: + checkName: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + storageClassName: + type: string + required: + - outcomes + - storageClassName + type: object + type: object + type: array type: object status: type: object diff --git a/config/crds/troubleshoot.replicated.com_collectors.yaml b/config/crds/troubleshoot.replicated.com_collectors.yaml index 7a214464c..317ed448d 100644 --- a/config/crds/troubleshoot.replicated.com_collectors.yaml +++ b/config/crds/troubleshoot.replicated.com_collectors.yaml @@ -431,6 +431,8 @@ spec: type: string containerPath: type: string + name: + type: string namespace: type: string selector: @@ -456,6 +458,8 @@ spec: type: array containerName: type: string + name: + type: string namespace: type: string selector: @@ -485,6 +489,8 @@ spec: required: - url type: object + name: + type: string post: properties: body: @@ -520,6 +526,10 @@ spec: properties: collectorName: type: string + containerNames: + items: + type: string + type: array limits: properties: maxAge: @@ -528,6 +538,8 @@ spec: format: int64 type: integer type: object + name: + type: string namespace: type: string selector: @@ -553,6 +565,8 @@ spec: type: string imagePullPolicy: type: string + name: + type: string namespace: type: string timeout: diff --git a/config/crds/troubleshoot.replicated.com_preflights.yaml b/config/crds/troubleshoot.replicated.com_preflights.yaml index ed7bc48e5..c0856d79b 100644 --- a/config/crds/troubleshoot.replicated.com_preflights.yaml +++ b/config/crds/troubleshoot.replicated.com_preflights.yaml @@ -475,6 +475,51 @@ spec: - outcomes - customResourceDefinitionName type: object + deploymentStatus: + properties: + checkName: + type: string + name: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - namespace + - name + type: object imagePullSecret: properties: checkName: @@ -609,6 +654,51 @@ spec: - secretName - namespace type: object + statefulsetStatus: + properties: + checkName: + type: string + name: + type: string + namespace: + type: string + outcomes: + items: + properties: + fail: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + pass: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + warn: + properties: + message: + type: string + uri: + type: string + when: + type: string + type: object + type: object + type: array + required: + - outcomes + - namespace + - name + type: object storageClass: properties: checkName: @@ -668,6 +758,8 @@ spec: type: string containerPath: type: string + name: + type: string namespace: type: string selector: @@ -693,6 +785,8 @@ spec: type: array containerName: type: string + name: + type: string namespace: type: string selector: @@ -722,6 +816,8 @@ spec: required: - url type: object + name: + type: string post: properties: body: @@ -757,6 +853,10 @@ spec: properties: collectorName: type: string + containerNames: + items: + type: string + type: array limits: properties: maxAge: @@ -765,6 +865,8 @@ spec: format: int64 type: integer type: object + name: + type: string namespace: type: string selector: @@ -790,6 +892,8 @@ spec: type: string imagePullPolicy: type: string + name: + type: string namespace: type: string timeout: diff --git a/config/crds/zz_generated.deepcopy.go b/config/crds/zz_generated.deepcopy.go index 8412ab12c..b77842a04 100644 --- a/config/crds/zz_generated.deepcopy.go +++ b/config/crds/zz_generated.deepcopy.go @@ -66,6 +66,16 @@ func (in *Analyze) DeepCopyInto(out *Analyze) { *out = new(ImagePullSecret) (*in).DeepCopyInto(*out) } + if in.DeploymentStatus != nil { + in, out := &in.DeploymentStatus, &out.DeploymentStatus + *out = new(DeploymentStatus) + (*in).DeepCopyInto(*out) + } + if in.StatefulsetStatus != nil { + in, out := &in.StatefulsetStatus, &out.StatefulsetStatus + *out = new(StatefulsetStatus) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Analyze. @@ -125,7 +135,7 @@ func (in *Analyzer) DeepCopyInto(out *Analyzer) { *out = *in out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) - out.Spec = in.Spec + in.Spec.DeepCopyInto(&out.Spec) out.Status = in.Status } @@ -271,6 +281,17 @@ func (in *AnalyzerList) DeepCopyObject() runtime.Object { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *AnalyzerSpec) DeepCopyInto(out *AnalyzerSpec) { *out = *in + if in.Analyzers != nil { + in, out := &in.Analyzers, &out.Analyzers + *out = make([]*Analyze, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Analyze) + (*in).DeepCopyInto(*out) + } + } + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AnalyzerSpec. @@ -704,6 +725,33 @@ func (in *CustomResourceDefinition) DeepCopy() *CustomResourceDefinition { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DeploymentStatus) DeepCopyInto(out *DeploymentStatus) { + *out = *in + out.AnalyzeMeta = in.AnalyzeMeta + if in.Outcomes != nil { + in, out := &in.Outcomes, &out.Outcomes + *out = make([]*Outcome, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Outcome) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DeploymentStatus. +func (in *DeploymentStatus) DeepCopy() *DeploymentStatus { + if in == nil { + return nil + } + out := new(DeploymentStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Exec) DeepCopyInto(out *Exec) { *out = *in @@ -866,6 +914,11 @@ func (in *Logs) DeepCopyInto(out *Logs) { *out = make([]string, len(*in)) copy(*out, *in) } + if in.ContainerNames != nil { + in, out := &in.ContainerNames, &out.ContainerNames + *out = make([]string, len(*in)) + copy(*out, *in) + } if in.Limits != nil { in, out := &in.Limits, &out.Limits *out = new(LogLimits) @@ -1275,6 +1328,33 @@ func (in *SingleOutcome) DeepCopy() *SingleOutcome { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StatefulsetStatus) DeepCopyInto(out *StatefulsetStatus) { + *out = *in + out.AnalyzeMeta = in.AnalyzeMeta + if in.Outcomes != nil { + in, out := &in.Outcomes, &out.Outcomes + *out = make([]*Outcome, len(*in)) + for i := range *in { + if (*in)[i] != nil { + in, out := &(*in)[i], &(*out)[i] + *out = new(Outcome) + (*in).DeepCopyInto(*out) + } + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StatefulsetStatus. +func (in *StatefulsetStatus) DeepCopy() *StatefulsetStatus { + if in == nil { + return nil + } + out := new(StatefulsetStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *StorageClass) DeepCopyInto(out *StorageClass) { *out = *in diff --git a/go.sum b/go.sum index 6b29639cf..9dc37d943 100644 --- a/go.sum +++ b/go.sum @@ -836,6 +836,7 @@ golang.org/x/tools v0.0.0-20190501045030-23463209683d h1:D7DVZUZEUgsSIDTivnUtVeG golang.org/x/tools v0.0.0-20190501045030-23463209683d/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59 h1:QjA/9ArTfVTLfEhClDCG7SGrZkZixxWpwNCDiwJfh88= golang.org/x/tools v0.0.0-20190614205625-5aca471b1d59/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190624190245-7f2218787638/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190703212419-2214986f1668/go.mod h1:jcCCGcm9btYwXyDqrUWc6MKQKKGJCWEQ3AfLSRIbEuI= diff --git a/pkg/analyze/deployment_status_test.go b/pkg/analyze/deployment_status_test.go index 01878c8ca..33c84fb37 100644 --- a/pkg/analyze/deployment_status_test.go +++ b/pkg/analyze/deployment_status_test.go @@ -38,7 +38,7 @@ func Test_deploymentStatus(t *testing.T) { IsPass: true, IsWarn: false, IsFail: false, - Title: "", + Title: "kotsadm-api Status", Message: "pass", }, files: map[string][]byte{ @@ -68,7 +68,7 @@ func Test_deploymentStatus(t *testing.T) { IsPass: false, IsWarn: false, IsFail: true, - Title: "", + Title: "kotsadm-api Status", Message: "fail", }, files: map[string][]byte{ @@ -104,7 +104,7 @@ func Test_deploymentStatus(t *testing.T) { IsPass: false, IsWarn: true, IsFail: false, - Title: "", + Title: "kotsadm-api Status", Message: "warn", }, files: map[string][]byte{ diff --git a/pkg/apis/troubleshoot/v1beta1/zz_generated.deepcopy.go b/pkg/apis/troubleshoot/v1beta1/zz_generated.deepcopy.go index 537f10415..443d258b7 100644 --- a/pkg/apis/troubleshoot/v1beta1/zz_generated.deepcopy.go +++ b/pkg/apis/troubleshoot/v1beta1/zz_generated.deepcopy.go @@ -16,7 +16,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -// Code generated by controller-gen. DO NOT EDIT. +// autogenerated by controller-gen object, do not modify manually package v1beta1