Skip to content

Commit cfa4e35

Browse files
Eneman DonatienEneman Donatien
authored andcommitted
[UP] ⬆️ Update S3Operator chart to support new s3Operator version
1 parent 9cdae0f commit cfa4e35

11 files changed

Lines changed: 416 additions & 125 deletions

charts/s3-operator/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type: application
1313
# This is the chart version. This version number should be incremented each time you make changes
1414
# to the chart and its templates, including the app version.
1515
# Versions are expected to follow Semantic Versioning (https://semver.org/)
16-
version: 0.5.5
16+
version: 0.6.0
1717
# This is the version number of the application being deployed. This version number should be
1818
# incremented each time you make changes to the application. Versions are not expected to
1919
# follow Semantic Versioning. They should reflect the version the application is using.

charts/s3-operator/templates/bucket-crd.yaml renamed to charts/s3-operator/templates/crd-bucket.yaml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
5-
name: buckets.s3.onyxia.sh
65
annotations:
76
{{- if .Values.crds.keep }}
8-
"helm.sh/resource-policy": keep
7+
helm.sh/resource-policy: keep
98
{{- end }}
10-
controller-gen.kubebuilder.io/version: v0.10.0
9+
controller-gen.kubebuilder.io/version: v0.11.1
1110
labels:
1211
{{- include "s3-operator.labels" . | nindent 4 }}
12+
name: buckets.s3.onyxia.sh
1313
spec:
1414
group: s3.onyxia.sh
1515
names:
@@ -61,23 +61,32 @@ spec:
6161
required:
6262
- default
6363
type: object
64+
s3InstanceRef:
65+
default: s3-operator/default
66+
description: s3InstanceRef where create the bucket
67+
maxLength: 127
68+
minLength: 1
69+
pattern: ^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(/[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)?$
70+
type: string
71+
x-kubernetes-validations:
72+
- message: s3InstanceRef is immutable
73+
rule: self == oldSelf
6474
required:
6575
- name
6676
- quota
77+
- s3InstanceRef
6778
type: object
6879
status:
6980
description: BucketStatus defines the observed state of Bucket
7081
properties:
7182
conditions:
72-
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
73-
of cluster Important: Run "make" to regenerate code after modifying
74-
this file'
83+
description: 'Status management using Conditions. See also : https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
7584
items:
7685
description: "Condition contains details for one aspect of the current
7786
state of this API Resource. --- This struct is intended for direct
7887
use as an array at the field path .status.conditions. For example,
79-
\n type FooStatus struct{ // Represents the observations of a foo's
80-
current state. // Known .status.conditions.type are: \"Available\",
88+
\n type FooStatus struct{ // Represents the observations of a
89+
foo's current state. // Known .status.conditions.type are: \"Available\",
8190
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
8291
// +listType=map // +listMapKey=type Conditions []metav1.Condition
8392
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
@@ -91,8 +100,8 @@ spec:
91100
format: date-time
92101
type: string
93102
message:
94-
description: message is a human readable message indicating details
95-
about the transition. This may be an empty string.
103+
description: message is a human readable message indicating
104+
details about the transition. This may be an empty string.
96105
maxLength: 32768
97106
type: string
98107
observedGeneration:
@@ -106,11 +115,11 @@ spec:
106115
type: integer
107116
reason:
108117
description: reason contains a programmatic identifier indicating
109-
the reason for the condition's last transition. Producers of
110-
specific condition types may define expected values and meanings
111-
for this field, and whether the values are considered a guaranteed
112-
API. The value should be a CamelCase string. This field may
113-
not be empty.
118+
the reason for the condition's last transition. Producers
119+
of specific condition types may define expected values and
120+
meanings for this field, and whether the values are considered
121+
a guaranteed API. The value should be a CamelCase string.
122+
This field may not be empty.
114123
maxLength: 1024
115124
minLength: 1
116125
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
@@ -145,10 +154,4 @@ spec:
145154
storage: true
146155
subresources:
147156
status: {}
148-
status:
149-
acceptedNames:
150-
kind: ""
151-
plural: ""
152-
conditions: []
153-
storedVersions: []
154157
{{- end }}

charts/s3-operator/templates/paths-crd.yaml renamed to charts/s3-operator/templates/crd-paths.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
5-
name: paths.s3.onyxia.sh
65
annotations:
76
{{- if .Values.crds.keep }}
8-
"helm.sh/resource-policy": keep
7+
helm.sh/resource-policy: keep
98
{{- end }}
109
controller-gen.kubebuilder.io/version: v0.11.1
1110
labels:
1211
{{- include "s3-operator.labels" . | nindent 4 }}
12+
name: paths.s3.onyxia.sh
1313
spec:
1414
group: s3.onyxia.sh
1515
names:
@@ -47,6 +47,16 @@ spec:
4747
items:
4848
type: string
4949
type: array
50+
s3InstanceRef:
51+
default: s3-operator/default
52+
description: s3InstanceRef where create the Paths
53+
maxLength: 127
54+
minLength: 1
55+
pattern: ^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(/[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)?$
56+
type: string
57+
x-kubernetes-validations:
58+
- message: s3InstanceRef is immutable
59+
rule: self == oldSelf
5060
required:
5161
- bucketName
5262
type: object

charts/s3-operator/templates/policy-crd.yaml renamed to charts/s3-operator/templates/crd-policies.yaml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
5-
name: policies.s3.onyxia.sh
65
annotations:
76
{{- if .Values.crds.keep }}
8-
"helm.sh/resource-policy": keep
7+
helm.sh/resource-policy: keep
98
{{- end }}
10-
controller-gen.kubebuilder.io/version: v0.10.0
9+
controller-gen.kubebuilder.io/version: v0.11.1
1110
labels:
1211
{{- include "s3-operator.labels" . | nindent 4 }}
12+
name: policies.s3.onyxia.sh
1313
spec:
1414
group: s3.onyxia.sh
1515
names:
@@ -45,6 +45,16 @@ spec:
4545
policyContent:
4646
description: Content of the policy (IAM JSON format)
4747
type: string
48+
s3InstanceRef:
49+
default: s3-operator/default
50+
description: s3InstanceRef where create the Policy
51+
maxLength: 127
52+
minLength: 1
53+
pattern: ^[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(/[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)?$
54+
type: string
55+
x-kubernetes-validations:
56+
- message: s3InstanceRef is immutable
57+
rule: self == oldSelf
4858
required:
4959
- name
5060
- policyContent
@@ -53,15 +63,13 @@ spec:
5363
description: PolicyStatus defines the observed state of Policy
5464
properties:
5565
conditions:
56-
description: 'INSERT ADDITIONAL STATUS FIELD - define observed state
57-
of cluster Important: Run "make" to regenerate code after modifying
58-
this file'
66+
description: 'Status management using Conditions. See also : https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties'
5967
items:
6068
description: "Condition contains details for one aspect of the current
6169
state of this API Resource. --- This struct is intended for direct
6270
use as an array at the field path .status.conditions. For example,
63-
\n type FooStatus struct{ // Represents the observations of a foo's
64-
current state. // Known .status.conditions.type are: \"Available\",
71+
\n type FooStatus struct{ // Represents the observations of a
72+
foo's current state. // Known .status.conditions.type are: \"Available\",
6573
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
6674
// +listType=map // +listMapKey=type Conditions []metav1.Condition
6775
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
@@ -75,8 +83,8 @@ spec:
7583
format: date-time
7684
type: string
7785
message:
78-
description: message is a human readable message indicating details
79-
about the transition. This may be an empty string.
86+
description: message is a human readable message indicating
87+
details about the transition. This may be an empty string.
8088
maxLength: 32768
8189
type: string
8290
observedGeneration:
@@ -90,11 +98,11 @@ spec:
9098
type: integer
9199
reason:
92100
description: reason contains a programmatic identifier indicating
93-
the reason for the condition's last transition. Producers of
94-
specific condition types may define expected values and meanings
95-
for this field, and whether the values are considered a guaranteed
96-
API. The value should be a CamelCase string. This field may
97-
not be empty.
101+
the reason for the condition's last transition. Producers
102+
of specific condition types may define expected values and
103+
meanings for this field, and whether the values are considered
104+
a guaranteed API. The value should be a CamelCase string.
105+
This field may not be empty.
98106
maxLength: 1024
99107
minLength: 1
100108
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
@@ -129,10 +137,4 @@ spec:
129137
storage: true
130138
subresources:
131139
status: {}
132-
status:
133-
acceptedNames:
134-
kind: ""
135-
plural: ""
136-
conditions: []
137-
storedVersions: []
138140
{{- end }}

0 commit comments

Comments
 (0)