Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mark a number of fields as not being required #521

Merged
merged 1 commit into from Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 16 additions & 5 deletions config/crds/troubleshoot.sh_analyzers.yaml
Expand Up @@ -128,7 +128,6 @@ spec:
type: object
type: array
required:
- namespaces
- outcomes
type: object
clusterVersion:
Expand Down Expand Up @@ -316,6 +315,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -350,7 +353,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
distribution:
Expand Down Expand Up @@ -495,6 +497,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -529,7 +535,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
longhorn:
Expand Down Expand Up @@ -837,6 +842,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -875,7 +884,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
- selector
type: object
Expand Down Expand Up @@ -938,6 +946,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -972,7 +984,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
storageClass:
Expand Down
16 changes: 0 additions & 16 deletions config/crds/troubleshoot.sh_hostcollectors.yaml
Expand Up @@ -1060,22 +1060,6 @@ spec:
items:
type: string
type: array
required:
- amzn
- amzn2
- centos
- centos7
- centos8
- ol
- ol7
- ol8
- rhel
- rhel7
- rhel8
- ubuntu
- ubuntu16
- ubuntu18
- ubuntu20
type: object
tcpConnect:
properties:
Expand Down
16 changes: 0 additions & 16 deletions config/crds/troubleshoot.sh_hostpreflights.yaml
Expand Up @@ -1060,22 +1060,6 @@ spec:
items:
type: string
type: array
required:
- amzn
- amzn2
- centos
- centos7
- centos8
- ol
- ol7
- ol8
- rhel
- rhel7
- rhel8
- ubuntu
- ubuntu16
- ubuntu18
- ubuntu20
type: object
tcpConnect:
properties:
Expand Down
21 changes: 16 additions & 5 deletions config/crds/troubleshoot.sh_preflights.yaml
Expand Up @@ -128,7 +128,6 @@ spec:
type: object
type: array
required:
- namespaces
- outcomes
type: object
clusterVersion:
Expand Down Expand Up @@ -316,6 +315,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -350,7 +353,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
distribution:
Expand Down Expand Up @@ -495,6 +497,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -529,7 +535,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
longhorn:
Expand Down Expand Up @@ -837,6 +842,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -875,7 +884,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
- selector
type: object
Expand Down Expand Up @@ -938,6 +946,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -972,7 +984,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
storageClass:
Expand Down
21 changes: 16 additions & 5 deletions config/crds/troubleshoot.sh_supportbundles.yaml
Expand Up @@ -159,7 +159,6 @@ spec:
type: object
type: array
required:
- namespaces
- outcomes
type: object
clusterVersion:
Expand Down Expand Up @@ -347,6 +346,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -381,7 +384,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
distribution:
Expand Down Expand Up @@ -526,6 +528,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -560,7 +566,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
longhorn:
Expand Down Expand Up @@ -868,6 +873,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -906,7 +915,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
- selector
type: object
Expand Down Expand Up @@ -969,6 +977,10 @@ spec:
type: string
namespace:
type: string
namespaces:
items:
type: string
type: array
outcomes:
items:
properties:
Expand Down Expand Up @@ -1003,7 +1015,6 @@ spec:
type: array
required:
- name
- namespace
- outcomes
type: object
storageClass:
Expand Down
18 changes: 9 additions & 9 deletions pkg/apis/troubleshoot/v1beta2/analyzer_shared.go
Expand Up @@ -53,40 +53,40 @@ type ImagePullSecret struct {
type DeploymentStatus struct {
AnalyzeMeta `json:",inline" yaml:",inline"`
Outcomes []*Outcome `json:"outcomes" yaml:"outcomes"`
Namespace string `json:"namespace" yaml:"namespace"`
Namespaces []string `json:"namespaces" yaml:"namespaces"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
Name string `json:"name" yaml:"name"`
}

type StatefulsetStatus struct {
AnalyzeMeta `json:",inline" yaml:",inline"`
Outcomes []*Outcome `json:"outcomes" yaml:"outcomes"`
Namespace string `json:"namespace" yaml:"namespace"`
Namespaces []string `json:"namespaces" yaml:"namespaces"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
Name string `json:"name" yaml:"name"`
}

type JobStatus struct {
AnalyzeMeta `json:",inline" yaml:",inline"`
Outcomes []*Outcome `json:"outcomes" yaml:"outcomes"`
Namespace string `json:"namespace" yaml:"namespace"`
Namespaces []string `json:"namespaces" yaml:"namespaces"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
Name string `json:"name" yaml:"name"`
}

type ReplicaSetStatus struct {
AnalyzeMeta `json:",inline" yaml:",inline"`
Outcomes []*Outcome `json:"outcomes" yaml:"outcomes"`
Namespace string `json:"namespace" yaml:"namespace"`
Namespaces []string `json:"namespaces" yaml:"namespaces"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
Name string `json:"name" yaml:"name"`
Selector []string `json:"selector" yaml:"selector"`
}

type ClusterPodStatuses struct {
AnalyzeMeta `json:",inline" yaml:",inline"`
Outcomes []*Outcome `json:"outcomes" yaml:"outcomes"`
Namespaces []string `json:"namespaces" yaml:"namespaces"`
Namespaces []string `json:"namespaces,omitempty" yaml:"namespaces,omitempty"`
}

type ContainerRuntime struct {
Expand Down
30 changes: 15 additions & 15 deletions pkg/apis/troubleshoot/v1beta2/hostcollector_shared.go
Expand Up @@ -69,21 +69,21 @@ type HostBlockDevices struct {

type HostSystemPackages struct {
HostCollectorMeta `json:",inline" yaml:",inline"`
Ubuntu []string `json:"ubuntu"`
Ubuntu16 []string `json:"ubuntu16"`
Ubuntu18 []string `json:"ubuntu18"`
Ubuntu20 []string `json:"ubuntu20"`
RHEL []string `json:"rhel"`
RHEL7 []string `json:"rhel7"`
RHEL8 []string `json:"rhel8"`
CentOS []string `json:"centos"`
CentOS7 []string `json:"centos7"`
CentOS8 []string `json:"centos8"`
OracleLinux []string `json:"ol"`
OracleLinux7 []string `json:"ol7"`
OracleLinux8 []string `json:"ol8"`
AmazonLinux []string `json:"amzn"`
AmazonLinux2 []string `json:"amzn2"`
Ubuntu []string `json:"ubuntu,omitempty"`
Ubuntu16 []string `json:"ubuntu16,omitempty"`
Ubuntu18 []string `json:"ubuntu18,omitempty"`
Ubuntu20 []string `json:"ubuntu20,omitempty"`
RHEL []string `json:"rhel,omitempty"`
RHEL7 []string `json:"rhel7,omitempty"`
RHEL8 []string `json:"rhel8,omitempty"`
CentOS []string `json:"centos,omitempty"`
CentOS7 []string `json:"centos7,omitempty"`
CentOS8 []string `json:"centos8,omitempty"`
OracleLinux []string `json:"ol,omitempty"`
OracleLinux7 []string `json:"ol7,omitempty"`
OracleLinux8 []string `json:"ol8,omitempty"`
AmazonLinux []string `json:"amzn,omitempty"`
AmazonLinux2 []string `json:"amzn2,omitempty"`
}

type HostKernelModules struct {
Expand Down

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