You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: create root level HelmConfig struct which applies to all HelmReleases (#356)
## Issue
First step into resolving
- validator-labs/validatorctl#100
## Description
In an effort to simplify the TUI prompts in validatorctl to not require
lots of re-prompts for the helm configuration, we first need to refactor
our helm related structs.
The proposed structure would be this:
- `ValidatorConfigSpec.HelmConfig` defines the helm registry
configuration that would be used to pull all plugin charts
- `ValidatorConfigSpec.Plugins` has been simplifies to only specify the
charts repository, name, version, and values.
Along side this change, I updated the `reviewable-ext` make target to
also update the CRDs in the validator helm chart
description: ValidationResult is the Schema for the validationresults API
33
+
description: ValidationResult is the Schema for the validationresults API.
34
34
properties:
35
35
apiVersion:
36
-
description: 'APIVersion defines the versioned schema of this representation
37
-
of an object. Servers should convert recognized schemas to the latest
38
-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
36
+
description: |-
37
+
APIVersion defines the versioned schema of this representation of an object.
38
+
Servers should convert recognized schemas to the latest internal value, and
39
+
may reject unrecognized values.
40
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
39
41
type: string
40
42
kind:
41
-
description: 'Kind is a string value representing the REST resource this
42
-
object represents. Servers may infer this from the endpoint the client
43
-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
43
+
description: |-
44
+
Kind is a string value representing the REST resource this object represents.
45
+
Servers may infer this from the endpoint the client submits requests to.
46
+
Cannot be updated.
47
+
In CamelCase.
48
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
44
49
type: string
45
50
metadata:
46
51
type: object
47
52
spec:
48
-
description: ValidationResultSpec defines the desired state of ValidationResult
53
+
description: ValidationResultSpec defines the desired state of ValidationResult.
49
54
properties:
50
55
expectedResults:
51
56
description: The number of rules in the validator plugin spec, hence
52
57
the number of expected ValidationResults.
53
58
minimum: 1
54
59
type: integer
55
60
plugin:
61
+
description: Plugin is the plugin code of the validator plugin that
62
+
was executed.
56
63
type: string
57
64
required:
58
65
- expectedResults
59
66
- plugin
60
67
type: object
61
68
status:
62
-
description: ValidationResultStatus defines the observed state of ValidationResult
69
+
description: ValidationResultStatus defines the observed state of ValidationResult.
63
70
properties:
64
71
conditions:
72
+
description: Conditions is a list of conditions that describe the
73
+
current state of the ValidationResult.
65
74
items:
66
75
description: Condition defines an observation of a Cluster API resource
67
76
operational state.
68
77
properties:
69
78
lastTransitionTime:
70
-
description: Last time the condition transitioned from one status
71
-
to another. This should be when the underlying condition changed.
72
-
If that is not known, then using the time when the API field
73
-
changed is acceptable.
79
+
description: |-
80
+
Last time the condition transitioned from one status to another.
81
+
This should be when the underlying condition changed. If that is not known, then using the time when
82
+
the API field changed is acceptable.
74
83
format: date-time
75
84
type: string
76
85
message:
77
-
description: A human readable message indicating details about
78
-
the transition. This field may be empty.
86
+
description: |-
87
+
A human readable message indicating details about the transition.
88
+
This field may be empty.
79
89
type: string
80
90
reason:
81
-
description: The reason for the condition's last transition
82
-
in CamelCase. The specific API may choose whether or not this
83
-
field is considered a guaranteed API. This field may not be
84
-
empty.
91
+
description: |-
92
+
The reason for the condition's last transition in CamelCase.
93
+
The specific API may choose whether or not this field is considered a guaranteed API.
94
+
This field may not be empty.
85
95
type: string
86
96
severity:
87
-
description: Severity provides an explicit classification of
88
-
Reason code, so the users or machines can immediately understand
89
-
the current situation and act accordingly. The Severity field
90
-
MUST be set only when Status=False.
97
+
description: |-
98
+
Severity provides an explicit classification of Reason code, so the users or machines can immediately
99
+
understand the current situation and act accordingly.
100
+
The Severity field MUST be set only when Status=False.
91
101
type: string
92
102
status:
93
103
description: Status of the condition, one of True, False, Unknown.
94
104
type: string
95
105
type:
96
-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
97
-
Many .condition.type values are consistent across resources
98
-
like Available, but because arbitrary conditions can be useful
99
-
(see .node.status.conditions), the ability to deconflict is
100
-
important.
106
+
description: |-
107
+
Type of condition in CamelCase or in foo.example.com/CamelCase.
108
+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
109
+
can be useful (see .node.status.conditions), the ability to deconflict is important.
101
110
type: string
102
111
required:
103
112
- lastTransitionTime
@@ -106,9 +115,14 @@ spec:
106
115
type: object
107
116
type: array
108
117
state:
118
+
description: State is the overall state of the validation result.
109
119
type: string
110
120
validationConditions:
121
+
description: ValidationConditions is a list of conditions that describe
122
+
the validation rules associated with the ValidationResult.
111
123
items:
124
+
description: ValidationCondition describes the state of a validation
description: ValidatorConfig is the Schema for the validatorconfigs API
20
+
description: ValidatorConfig is the Schema for the validatorconfigs API.
21
21
properties:
22
22
apiVersion:
23
-
description: 'APIVersion defines the versioned schema of this representation
24
-
of an object. Servers should convert recognized schemas to the latest
25
-
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
23
+
description: |-
24
+
APIVersion defines the versioned schema of this representation of an object.
25
+
Servers should convert recognized schemas to the latest internal value, and
26
+
may reject unrecognized values.
27
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
26
28
type: string
27
29
kind:
28
-
description: 'Kind is a string value representing the REST resource this
29
-
object represents. Servers may infer this from the endpoint the client
30
-
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
30
+
description: |-
31
+
Kind is a string value representing the REST resource this object represents.
32
+
Servers may infer this from the endpoint the client submits requests to.
33
+
Cannot be updated.
34
+
In CamelCase.
35
+
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
31
36
type: string
32
37
metadata:
33
38
type: object
34
39
spec:
35
-
description: ValidatorConfigSpec defines the desired state of ValidatorConfig
40
+
description: ValidatorConfigSpec defines the desired state of ValidatorConfig.
36
41
properties:
42
+
helmConfig:
43
+
description: HelmConfig defines the configuration for the Helm registry.
44
+
properties:
45
+
authSecretName:
46
+
description: AuthSecretName is the name of the K8s secret containing
47
+
the authentication details for the Helm repository.
48
+
type: string
49
+
caFile:
50
+
description: CAFile is the path to the CA certificate for the
51
+
Helm repository.
52
+
type: string
53
+
insecureSkipVerify:
54
+
description: InsecureSkipTLSVerify skips the verification of the
55
+
server's certificate chain and host name.
56
+
type: boolean
57
+
registry:
58
+
description: Registry is the URL of the Helm registry.
59
+
type: string
60
+
required:
61
+
- registry
62
+
type: object
37
63
plugins:
64
+
description: Plugins defines the configuration for the validator plugins.
38
65
items:
66
+
description: HelmRelease defines the configuration for a Helm chart
67
+
release.
39
68
properties:
40
69
chart:
70
+
description: Chart defines the Helm chart to be installed.
41
71
properties:
42
-
authSecretName:
43
-
type: string
44
-
caFile:
45
-
type: string
46
-
insecureSkipVerify:
47
-
type: boolean
48
72
name:
73
+
description: Name of the Helm chart.
49
74
type: string
50
75
repository:
76
+
description: Repository of the Helm chart.
51
77
type: string
52
78
version:
79
+
description: Version of the Helm chart.
53
80
type: string
54
81
required:
55
82
- name
56
83
- repository
57
84
- version
58
85
type: object
59
86
values:
87
+
description: Values defines the values to be passed to the Helm
88
+
chart.
60
89
type: string
61
90
required:
62
91
- chart
63
92
- values
64
93
type: object
65
94
type: array
66
95
sink:
96
+
description: Sink defines the configuration for the notification sink.
67
97
properties:
68
98
secretName:
69
-
description: Name of a K8s secret containing configuration details
70
-
for the sink
99
+
description: SecretName is the name of a K8s secret containing
100
+
configuration details for the sink.
71
101
type: string
72
102
type:
103
+
description: Type of the sink.
73
104
enum:
74
105
- alertmanager
75
106
- slack
@@ -78,23 +109,28 @@ spec:
78
109
- secretName
79
110
- type
80
111
type: object
112
+
required:
113
+
- helmConfig
81
114
type: object
82
115
status:
83
116
description: ValidatorConfigStatus defines the observed state of ValidatorConfig
84
117
properties:
85
118
conditions:
86
119
items:
120
+
description: ValidatorPluginCondition describes the state of a Validator
121
+
plugin.
87
122
properties:
88
123
lastUpdatedTime:
89
-
description: Last time the condition transitioned from one status
90
-
to another. This should be when the underlying condition changed.
91
-
If that is not known, then using the time when the API field
92
-
changed is acceptable.
124
+
description: |-
125
+
Last time the condition transitioned from one status to another.
126
+
This should be when the underlying condition changed. If that is not known, then using the time when
127
+
the API field changed is acceptable.
93
128
format: date-time
94
129
type: string
95
130
message:
96
-
description: A human readable message indicating details about
97
-
the transition. This field may be empty.
131
+
description: |-
132
+
A human readable message indicating details about the transition.
133
+
This field may be empty.
98
134
type: string
99
135
pluginName:
100
136
description: Name of the Validator plugin.
@@ -103,11 +139,10 @@ spec:
103
139
description: Status of the condition, one of True, False, Unknown.
104
140
type: string
105
141
type:
106
-
description: Type of condition in CamelCase or in foo.example.com/CamelCase.
107
-
Many .condition.type values are consistent across resources
108
-
like Available, but because arbitrary conditions can be useful
109
-
(see .node.status.conditions), the ability to deconflict is
110
-
important.
142
+
description: |-
143
+
Type of condition in CamelCase or in foo.example.com/CamelCase.
144
+
Many .condition.type values are consistent across resources like Available, but because arbitrary conditions
145
+
can be useful (see .node.status.conditions), the ability to deconflict is important.
0 commit comments