Skip to content

Commit e006fb4

Browse files
Eneman DonatienEneman Donatien
authored andcommitted
[ENH] ✨ add some test and modify ci for docker image
1 parent 829064e commit e006fb4

32 files changed

+1152
-491
lines changed

.github/workflows/ci-docker.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,14 @@ jobs:
3333

3434
- name: Docker meta
3535
id: docker_meta
36-
uses: crazy-max/ghaction-docker-meta@v5.1.0
36+
uses: docker/metadata-action@v5
3737
with:
3838
images: inseefrlab/s3-operator # list of Docker images to use as base name for tags
39+
tags: |
40+
type=ref,event=branch
41+
type=ref,event=pr
42+
type=semver,pattern={{version}}
43+
type=semver,pattern={{major}}.{{minor}}
3944
4045
- name: Set up QEMU
4146
uses: docker/setup-qemu-action@v3
@@ -51,17 +56,15 @@ jobs:
5156
password: ${{ secrets.DOCKERHUB_TOKEN }}
5257

5358
- name: Build and push
54-
uses: docker/build-push-action@v5
59+
uses: docker/build-push-action@v6
5560
with:
5661
context: .
5762
file: ./Dockerfile
5863
push: ${{ github.event_name != 'pull_request' }}
59-
# Use tags computed before and also latest if on master
64+
# Use tags computed before
6065
tags: |
6166
${{ steps.docker_meta.outputs.tags }}
62-
${{ github.ref == 'refs/heads/main' && 'inseefrlab/s3-operator:latest' || '' }}
6367
labels: ${{ steps.docker_meta.outputs.labels }}
6468
platforms: linux/amd64,linux/arm64
65-
6669
- name: Image digest
6770
run: echo ${{ steps.docker_build.outputs.digest }}

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,3 +398,4 @@ More information can be found via the [Kubebuilder Documentation](https://book.k
398398

399399
</details>
400400

401+

config/crd/bases/s3.onyxia.sh_buckets.yaml

Lines changed: 124 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -14,134 +14,133 @@ spec:
1414
singular: bucket
1515
scope: Namespaced
1616
versions:
17-
- name: v1alpha1
18-
schema:
19-
openAPIV3Schema:
20-
description: Bucket is the Schema for the buckets API
21-
properties:
22-
apiVersion:
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
28-
type: string
29-
kind:
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
36-
type: string
37-
metadata:
38-
type: object
39-
spec:
40-
description: BucketSpec defines the desired state of Bucket
41-
properties:
42-
name:
43-
description: Name of the bucket
17+
- name: v1alpha1
18+
schema:
19+
openAPIV3Schema:
20+
description: Bucket is the Schema for the buckets API
21+
properties:
22+
apiVersion:
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
28+
type: string
29+
kind:
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
36+
type: string
37+
metadata:
38+
type: object
39+
spec:
40+
description: BucketSpec defines the desired state of Bucket
41+
properties:
42+
name:
43+
description: Name of the bucket
44+
type: string
45+
paths:
46+
description: Paths (folders) to create inside the bucket
47+
items:
4448
type: string
45-
paths:
46-
description: Paths (folders) to create inside the bucket
47-
items:
48-
type: string
49-
type: array
50-
quota:
51-
description: Quota to apply to the bucket
49+
type: array
50+
quota:
51+
description: Quota to apply to the bucket
52+
properties:
53+
default:
54+
description: Default quota to apply, mandatory
55+
format: int64
56+
type: integer
57+
override:
58+
description: Optional override quota, to be used by cluster admin.
59+
format: int64
60+
type: integer
61+
required:
62+
- default
63+
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
74+
required:
75+
- name
76+
- quota
77+
- s3InstanceRef
78+
type: object
79+
status:
80+
description: BucketStatus defines the observed state of Bucket
81+
properties:
82+
conditions:
83+
description: |-
84+
Status management using Conditions.
85+
See also : https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
86+
items:
87+
description: Condition contains details for one aspect of the current
88+
state of this API Resource.
5289
properties:
53-
default:
54-
description: Default quota to apply, mandatory
55-
format: int64
56-
type: integer
57-
override:
58-
description: Optional override quota, to be used by cluster admin.
90+
lastTransitionTime:
91+
description: |-
92+
lastTransitionTime is the last time the condition transitioned from one status to another.
93+
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
94+
format: date-time
95+
type: string
96+
message:
97+
description: |-
98+
message is a human readable message indicating details about the transition.
99+
This may be an empty string.
100+
maxLength: 32768
101+
type: string
102+
observedGeneration:
103+
description: |-
104+
observedGeneration represents the .metadata.generation that the condition was set based upon.
105+
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
106+
with respect to the current state of the instance.
59107
format: int64
108+
minimum: 0
60109
type: integer
110+
reason:
111+
description: |-
112+
reason contains a programmatic identifier indicating the reason for the condition's last transition.
113+
Producers of specific condition types may define expected values and meanings for this field,
114+
and whether the values are considered a guaranteed API.
115+
The value should be a CamelCase string.
116+
This field may not be empty.
117+
maxLength: 1024
118+
minLength: 1
119+
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
120+
type: string
121+
status:
122+
description: status of the condition, one of True, False, Unknown.
123+
enum:
124+
- "True"
125+
- "False"
126+
- Unknown
127+
type: string
128+
type:
129+
description: type of condition in CamelCase or in foo.example.com/CamelCase.
130+
maxLength: 316
131+
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])$
132+
type: string
61133
required:
62-
- default
134+
- lastTransitionTime
135+
- message
136+
- reason
137+
- status
138+
- type
63139
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
74-
required:
75-
- name
76-
- quota
77-
- s3InstanceRef
78-
type: object
79-
status:
80-
description: BucketStatus defines the observed state of Bucket
81-
properties:
82-
conditions:
83-
description: |-
84-
Status management using Conditions.
85-
See also : https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
86-
items:
87-
description:
88-
Condition contains details for one aspect of the current
89-
state of this API Resource.
90-
properties:
91-
lastTransitionTime:
92-
description: |-
93-
lastTransitionTime is the last time the condition transitioned from one status to another.
94-
This should be when the underlying condition changed. If that is not known, then using the time when the API field changed is acceptable.
95-
format: date-time
96-
type: string
97-
message:
98-
description: |-
99-
message is a human readable message indicating details about the transition.
100-
This may be an empty string.
101-
maxLength: 32768
102-
type: string
103-
observedGeneration:
104-
description: |-
105-
observedGeneration represents the .metadata.generation that the condition was set based upon.
106-
For instance, if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration is 9, the condition is out of date
107-
with respect to the current state of the instance.
108-
format: int64
109-
minimum: 0
110-
type: integer
111-
reason:
112-
description: |-
113-
reason contains a programmatic identifier indicating the reason for the condition's last transition.
114-
Producers of specific condition types may define expected values and meanings for this field,
115-
and whether the values are considered a guaranteed API.
116-
The value should be a CamelCase string.
117-
This field may not be empty.
118-
maxLength: 1024
119-
minLength: 1
120-
pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$
121-
type: string
122-
status:
123-
description: status of the condition, one of True, False, Unknown.
124-
enum:
125-
- "True"
126-
- "False"
127-
- Unknown
128-
type: string
129-
type:
130-
description: type of condition in CamelCase or in foo.example.com/CamelCase.
131-
maxLength: 316
132-
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])$
133-
type: string
134-
required:
135-
- lastTransitionTime
136-
- message
137-
- reason
138-
- status
139-
- type
140-
type: object
141-
type: array
142-
type: object
143-
type: object
144-
served: true
145-
storage: true
146-
subresources:
147-
status: {}
140+
type: array
141+
type: object
142+
type: object
143+
served: true
144+
storage: true
145+
subresources:
146+
status: {}

0 commit comments

Comments
 (0)