Skip to content

Commit 0052f71

Browse files
committed
Include conditions on supported types
Adds support for setting the status conditions on the following types: - vaultstaticsecrets - vaultpkisecrets - vaultdynamicsecrets - hcpauths - hcpvaultsecretsapps
1 parent aa6ac51 commit 0052f71

27 files changed

+1193
-87
lines changed

api/v1beta1/hcpauth_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ type HCPAuthStatus struct {
5151
// Valid auth mechanism.
5252
Valid *bool `json:"valid"`
5353
Error string `json:"error"`
54+
// Conditions hold information that be used by other apps to determine the health
55+
// the resource instance.
56+
Conditions []metav1.Condition `json:"conditions,omitempty"`
5457
}
5558

5659
// +kubebuilder:object:root=true

api/v1beta1/hcpvaultsecretsapp_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,9 @@ type HCPVaultSecretsAppStatus struct {
8181
// DynamicSecrets lists the last observed state of any dynamic secrets
8282
// within the HCP Vault Secrets App
8383
DynamicSecrets []HVSDynamicStatus `json:"dynamicSecrets,omitempty"`
84+
// Conditions hold information that be used by other apps to determine the health
85+
// the resource instance.
86+
Conditions []metav1.Condition `json:"conditions,omitempty"`
8487
}
8588

8689
// +kubebuilder:object:root=true

api/v1beta1/vaultconnection_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ type VaultConnectionSpec struct {
3131
type VaultConnectionStatus struct {
3232
// Valid auth mechanism.
3333
Valid *bool `json:"valid"`
34+
// Conditions hold information that be used by other apps to determine the health
35+
// the resource instance.
36+
Conditions []metav1.Condition `json:"conditions,omitempty"`
3437
}
3538

3639
// +kubebuilder:object:root=true

api/v1beta1/vaultdynamicsecret_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ type VaultDynamicSecretStatus struct {
9797
// VaultClientMeta contains the status of the Vault client and is used during
9898
// resource reconciliation.
9999
VaultClientMeta VaultClientMeta `json:"vaultClientMeta,omitempty"`
100+
// Conditions hold information that be used by other apps to determine the health
101+
// the resource instance.
102+
Conditions []metav1.Condition `json:"conditions,omitempty"`
100103
}
101104

102105
type VaultSecretLease struct {

api/v1beta1/vaultpkisecret_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,9 @@ type VaultPKISecretStatus struct {
138138
SecretMAC string `json:"secretMAC,omitempty"`
139139
Valid *bool `json:"valid"`
140140
Error string `json:"error"`
141+
// Conditions hold information that be used by other apps to determine the health
142+
// the resource instance.
143+
Conditions []metav1.Condition `json:"conditions,omitempty"`
141144
}
142145

143146
// +kubebuilder:object:root=true

api/v1beta1/vaultstaticsecret_types.go

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,9 @@ type VaultStaticSecretStatus struct {
7676
// The SecretMac is also used to detect drift in the Destination Secret's Data.
7777
// If drift is detected the data will be synced to the Destination.
7878
SecretMAC string `json:"secretMAC,omitempty"`
79+
// Conditions hold information that be used by other apps to determine the health
80+
// the resource instance.
81+
Conditions []metav1.Condition `json:"conditions,omitempty"`
7982
}
8083

8184
// +kubebuilder:object:root=true

api/v1beta1/zz_generated.deepcopy.go

+44-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

chart/crds/secrets.hashicorp.com_hcpauths.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,65 @@ spec:
9494
status:
9595
description: HCPAuthStatus defines the observed state of HCPAuth
9696
properties:
97+
conditions:
98+
description: |-
99+
Conditions hold information that be used by other apps to determine the health
100+
the resource instance.
101+
items:
102+
description: Condition contains details for one aspect of the current
103+
state of this API Resource.
104+
properties:
105+
lastTransitionTime:
106+
description: |-
107+
lastTransitionTime is the last time the condition transitioned from one status to another.
108+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
109+
format: date-time
110+
type: string
111+
message:
112+
description: |-
113+
message is a human readable message indicating details about the transition.
114+
This may be an empty string.
115+
maxLength: 32768
116+
type: string
117+
observedGeneration:
118+
description: |-
119+
observedGeneration represents the .metadata.generation that the condition was set based upon.
120+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
121+
with respect to the current state of the instance.
122+
format: int64
123+
minimum: 0
124+
type: integer
125+
reason:
126+
description: |-
127+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
128+
Producers of specific condition types may define expected values and meanings for this field,
129+
and whether the values are considered a guaranteed API.
130+
The value should be a CamelCase string.
131+
This field may not be empty.
132+
maxLength: 1024
133+
minLength: 1
134+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
135+
type: string
136+
status:
137+
description: status of the condition, one of True, False, Unknown.
138+
enum:
139+
- "True"
140+
- "False"
141+
- Unknown
142+
type: string
143+
type:
144+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
145+
maxLength: 316
146+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
147+
type: string
148+
required:
149+
- lastTransitionTime
150+
- message
151+
- reason
152+
- status
153+
- type
154+
type: object
155+
type: array
97156
error:
98157
type: string
99158
valid:

chart/crds/secrets.hashicorp.com_hcpvaultsecretsapps.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -266,6 +266,65 @@ spec:
266266
status:
267267
description: HCPVaultSecretsAppStatus defines the observed state of HCPVaultSecretsApp
268268
properties:
269+
conditions:
270+
description: |-
271+
Conditions hold information that be used by other apps to determine the health
272+
the resource instance.
273+
items:
274+
description: Condition contains details for one aspect of the current
275+
state of this API Resource.
276+
properties:
277+
lastTransitionTime:
278+
description: |-
279+
lastTransitionTime is the last time the condition transitioned from one status to another.
280+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
281+
format: date-time
282+
type: string
283+
message:
284+
description: |-
285+
message is a human readable message indicating details about the transition.
286+
This may be an empty string.
287+
maxLength: 32768
288+
type: string
289+
observedGeneration:
290+
description: |-
291+
observedGeneration represents the .metadata.generation that the condition was set based upon.
292+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
293+
with respect to the current state of the instance.
294+
format: int64
295+
minimum: 0
296+
type: integer
297+
reason:
298+
description: |-
299+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
300+
Producers of specific condition types may define expected values and meanings for this field,
301+
and whether the values are considered a guaranteed API.
302+
The value should be a CamelCase string.
303+
This field may not be empty.
304+
maxLength: 1024
305+
minLength: 1
306+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
307+
type: string
308+
status:
309+
description: status of the condition, one of True, False, Unknown.
310+
enum:
311+
- "True"
312+
- "False"
313+
- Unknown
314+
type: string
315+
type:
316+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
317+
maxLength: 316
318+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
319+
type: string
320+
required:
321+
- lastTransitionTime
322+
- message
323+
- reason
324+
- status
325+
- type
326+
type: object
327+
type: array
269328
dynamicSecrets:
270329
description: |-
271330
DynamicSecrets lists the last observed state of any dynamic secrets

chart/crds/secrets.hashicorp.com_vaultconnections.yaml

+59
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,65 @@ spec:
7474
status:
7575
description: VaultConnectionStatus defines the observed state of VaultConnection
7676
properties:
77+
conditions:
78+
description: |-
79+
Conditions hold information that be used by other apps to determine the health
80+
the resource instance.
81+
items:
82+
description: Condition contains details for one aspect of the current
83+
state of this API Resource.
84+
properties:
85+
lastTransitionTime:
86+
description: |-
87+
lastTransitionTime is the last time the condition transitioned from one status to another.
88+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
89+
format: date-time
90+
type: string
91+
message:
92+
description: |-
93+
message is a human readable message indicating details about the transition.
94+
This may be an empty string.
95+
maxLength: 32768
96+
type: string
97+
observedGeneration:
98+
description: |-
99+
observedGeneration represents the .metadata.generation that the condition was set based upon.
100+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
101+
with respect to the current state of the instance.
102+
format: int64
103+
minimum: 0
104+
type: integer
105+
reason:
106+
description: |-
107+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
108+
Producers of specific condition types may define expected values and meanings for this field,
109+
and whether the values are considered a guaranteed API.
110+
The value should be a CamelCase string.
111+
This field may not be empty.
112+
maxLength: 1024
113+
minLength: 1
114+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
115+
type: string
116+
status:
117+
description: status of the condition, one of True, False, Unknown.
118+
enum:
119+
- "True"
120+
- "False"
121+
- Unknown
122+
type: string
123+
type:
124+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
125+
maxLength: 316
126+
pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$
127+
type: string
128+
required:
129+
- lastTransitionTime
130+
- message
131+
- reason
132+
- status
133+
- type
134+
type: object
135+
type: array
77136
valid:
78137
description: Valid auth mechanism.
79138
type: boolean

0 commit comments

Comments
 (0)