Skip to content

Commit c4aefca

Browse files
committed
add kubernetes-sigs/container-object-storage-interface
Signed-off-by: Sebastian Hoß <[email protected]>
1 parent 5bc0310 commit c4aefca

File tree

19 files changed

+690
-0
lines changed

19 files changed

+690
-0
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# SPDX-FileCopyrightText: The kube-custom-resources-rs Authors
2+
# SPDX-License-Identifier: 0BSD
3+
4+
name: Release objectstorage_k8s_io
5+
on:
6+
schedule:
7+
- cron: 41 17 * * SUN
8+
workflow_dispatch:
9+
jobs:
10+
release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- id: checkout
14+
name: Checkout
15+
uses: actions/checkout@v4
16+
- id: commits
17+
name: Count Commits
18+
run: echo "count=$(git rev-list --count HEAD --since='last Sunday' -- custom-resources/objectstorage_k8s_io)" >> $GITHUB_OUTPUT
19+
- id: release
20+
name: Create Release Version
21+
if: steps.commits.outputs.count > 0
22+
run: echo "version=1.$(date --utc +'%Y%m%d').$(date --utc +'%-H%M%S')" >> $GITHUB_OUTPUT
23+
- name: Set up Rust
24+
if: steps.commits.outputs.count > 0
25+
uses: dtolnay/rust-toolchain@stable
26+
- name: Install cargo-workspaces
27+
uses: taiki-e/install-action@v2
28+
with:
29+
tool: cargo-edit
30+
- name: Cargo Version
31+
if: steps.commits.outputs.count > 0
32+
run: cargo set-version --package kcr_objectstorage_k8s_io ${{ steps.release.outputs.version }}
33+
- name: Publish to crates.io
34+
if: steps.commits.outputs.count > 0
35+
run: >
36+
cargo publish
37+
--allow-dirty
38+
--token ${{ secrets.CRATES_IO_TOKEN }}
39+
--package kcr_objectstorage_k8s_io
40+
--jobs 1
41+
--no-verify
42+
env:
43+
RUSTFLAGS: "-A warnings"
44+
- id: mail
45+
name: Send Mail
46+
if: steps.commits.outputs.count > 0
47+
uses: dawidd6/action-send-mail@v4
48+
with:
49+
server_address: ${{ secrets.MAIL_SERVER }}
50+
server_port: ${{ secrets.MAIL_PORT }}
51+
username: ${{ secrets.MAIL_USERNAME }}
52+
password: ${{ secrets.MAIL_PASSWORD }}
53+
subject: ${{ github.event.repository.name }}/objectstorage_k8s_io version ${{ steps.release.outputs.version }} published
54+
body: See ${{ steps.create_release.outputs.url }} for details.
55+
to: ${{ secrets.MAIL_RECIPIENT }}
56+
from: ${{ secrets.MAIL_SENDER }}
57+
- id: matrix
58+
name: Send Matrix Message
59+
if: steps.commits.outputs.count > 0
60+
uses: s3krit/[email protected]
61+
with:
62+
room_id: ${{ secrets.MATRIX_ROOM_ID }}
63+
access_token: ${{ secrets.MATRIX_ACCESS_TOKEN }}
64+
message: ${{ github.event.repository.name }}/objectstorage_k8s_io version [${{ steps.release.outputs.version }}](${{ steps.create_release.outputs.url }}) published
65+
server: ${{ secrets.MATRIX_SERVER }}

.reuse/dep5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,6 +803,10 @@ Files: crd-catalog/kubernetes-sigs/cluster-api-provider-vsphere/*
803803
Copyright: The kubernetes-sigs/cluster-api-provider-vsphere Authors
804804
License: Apache-2.0
805805

806+
Files: crd-catalog/kubernetes-sigs/container-object-storage-interface/*
807+
Copyright: The kubernetes-sigs/container-object-storage-interface Authors
808+
License: Apache-2.0
809+
806810
Files: crd-catalog/kubernetes-sigs/external-dns/*
807811
Copyright: The kubernetes-sigs/external-dns Authors
808812
License: Apache-2.0

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,7 @@ members = [
265265
"custom-resources/notebook_kubedl_io",
266266
"custom-resources/notification_toolkit_fluxcd_io",
267267
"custom-resources/objectbucket_io",
268+
"custom-resources/objectstorage_k8s_io",
268269
"custom-resources/ocmagent_managed_openshift_io",
269270
"custom-resources/onepassword_com",
270271
"custom-resources/opensearch_opster_io",

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,7 @@ The following groups are available:
305305
- [notebook.kubedl.io](https://crates.io/crates/kcr_notebook_kubedl_io)
306306
- [notification.toolkit.fluxcd.io](https://crates.io/crates/kcr_notification_toolkit_fluxcd_io)
307307
- [objectbucket.io](https://crates.io/crates/kcr_objectbucket_io)
308+
- [objectstorage.k8s.io](https://crates.io/crates/kcr_objectstorage_k8s_io)
308309
- [ocmagent.managed.openshift.io](https://crates.io/crates/kcr_ocmagent_managed_openshift_io)
309310
- [onepassword.com](https://crates.io/crates/kcr_onepassword_com)
310311
- [opensearch.opster.io](https://crates.io/crates/kcr_opensearch_opster_io)

code-generator/src/catalog.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2220,6 +2220,18 @@ pub const CRD_V1_SOURCES: &'static [UpstreamSource] = &[
22202220
],
22212221
ignores: &[],
22222222
},
2223+
UpstreamSource {
2224+
project_name: "kubernetes-sigs/container-object-storage-interface",
2225+
license: APACHE_V2,
2226+
urls: &[
2227+
"https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/client/config/crd/objectstorage.k8s.io_bucketaccessclasses.yaml",
2228+
"https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/client/config/crd/objectstorage.k8s.io_bucketaccesses.yaml",
2229+
"https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/client/config/crd/objectstorage.k8s.io_bucketclaims.yaml",
2230+
"https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/client/config/crd/objectstorage.k8s.io_bucketclasses.yaml",
2231+
"https://github.com/kubernetes-sigs/container-object-storage-interface/blob/main/client/config/crd/objectstorage.k8s.io_buckets.yaml",
2232+
],
2233+
ignores: &[],
2234+
},
22232235
UpstreamSource {
22242236
project_name: "kubernetes-sigs/external-dns",
22252237
license: APACHE_V2,
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
apiVersion: "apiextensions.k8s.io/v1"
2+
kind: "CustomResourceDefinition"
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: "v0.16.4"
6+
name: "bucketaccessclasses.objectstorage.k8s.io"
7+
spec:
8+
group: "objectstorage.k8s.io"
9+
names:
10+
kind: "BucketAccessClass"
11+
listKind: "BucketAccessClassList"
12+
plural: "bucketaccessclasses"
13+
singular: "bucketaccessclass"
14+
scope: "Cluster"
15+
versions:
16+
- name: "v1alpha1"
17+
schema:
18+
openAPIV3Schema:
19+
properties:
20+
apiVersion:
21+
description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
22+
type: "string"
23+
authenticationType:
24+
description: "AuthenticationType denotes the style of authentication\nIt can be one of\nKey - access, secret tokens based authentication\nIAM - implicit authentication of pods to the OSP based on service account mappings"
25+
type: "string"
26+
driverName:
27+
description: "DriverName is the name of driver associated with\nthis BucketAccess"
28+
type: "string"
29+
kind:
30+
description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
31+
type: "string"
32+
metadata:
33+
type: "object"
34+
parameters:
35+
additionalProperties:
36+
type: "string"
37+
description: "Parameters is an opaque map for passing in configuration to a driver\nfor granting access to a bucket"
38+
type: "object"
39+
required:
40+
- "authenticationType"
41+
- "driverName"
42+
type: "object"
43+
served: true
44+
storage: true
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
apiVersion: "apiextensions.k8s.io/v1"
2+
kind: "CustomResourceDefinition"
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: "v0.16.4"
6+
name: "bucketaccesses.objectstorage.k8s.io"
7+
spec:
8+
group: "objectstorage.k8s.io"
9+
names:
10+
kind: "BucketAccess"
11+
listKind: "BucketAccessList"
12+
plural: "bucketaccesses"
13+
singular: "bucketaccess"
14+
scope: "Namespaced"
15+
versions:
16+
- name: "v1alpha1"
17+
schema:
18+
openAPIV3Schema:
19+
properties:
20+
apiVersion:
21+
description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
22+
type: "string"
23+
kind:
24+
description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
25+
type: "string"
26+
metadata:
27+
type: "object"
28+
spec:
29+
properties:
30+
bucketAccessClassName:
31+
description: "BucketAccessClassName is the name of the BucketAccessClass"
32+
type: "string"
33+
bucketClaimName:
34+
description: "BucketClaimName is the name of the BucketClaim."
35+
type: "string"
36+
credentialsSecretName:
37+
description: "CredentialsSecretName is the name of the secret that COSI should populate\nwith the credentials. If a secret by this name already exists, then it is\nassumed that credentials have already been generated. It is not overridden.\nThis secret is deleted when the BucketAccess is delted."
38+
type: "string"
39+
protocol:
40+
description: "Protocol is the name of the Protocol\nthat this access credential is supposed to support\nIf left empty, it will choose the protocol supported\nby the bucket. If the bucket supports multiple protocols,\nthe end protocol is determined by the driver."
41+
type: "string"
42+
serviceAccountName:
43+
description: "ServiceAccountName is the name of the serviceAccount that COSI will map\nto the OSP service account when IAM styled authentication is specified"
44+
type: "string"
45+
required:
46+
- "bucketAccessClassName"
47+
- "bucketClaimName"
48+
- "credentialsSecretName"
49+
type: "object"
50+
status:
51+
properties:
52+
accessGranted:
53+
description: "AccessGranted indicates the successful grant of privileges to access the bucket"
54+
type: "boolean"
55+
accountID:
56+
description: "AccountID is the unique ID for the account in the OSP. It will be populated\nby the COSI sidecar once access has been successfully granted."
57+
type: "string"
58+
type: "object"
59+
type: "object"
60+
served: true
61+
storage: true
62+
subresources:
63+
status: {}
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
apiVersion: "apiextensions.k8s.io/v1"
2+
kind: "CustomResourceDefinition"
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: "v0.16.4"
6+
name: "bucketclaims.objectstorage.k8s.io"
7+
spec:
8+
group: "objectstorage.k8s.io"
9+
names:
10+
kind: "BucketClaim"
11+
listKind: "BucketClaimList"
12+
plural: "bucketclaims"
13+
singular: "bucketclaim"
14+
scope: "Namespaced"
15+
versions:
16+
- name: "v1alpha1"
17+
schema:
18+
openAPIV3Schema:
19+
properties:
20+
apiVersion:
21+
description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
22+
type: "string"
23+
kind:
24+
description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
25+
type: "string"
26+
metadata:
27+
type: "object"
28+
spec:
29+
properties:
30+
bucketClassName:
31+
description: "Name of the BucketClass"
32+
type: "string"
33+
existingBucketName:
34+
description: "Name of a bucket object that was manually\ncreated to import a bucket created outside of COSI\nIf unspecified, then a new Bucket will be dynamically provisioned"
35+
type: "string"
36+
protocols:
37+
description: "Protocols are the set of data API this bucket is required to support.\nThe possible values for protocol are:\n- S3: Indicates Amazon S3 protocol\n- Azure: Indicates Microsoft Azure BlobStore protocol\n- GCS: Indicates Google Cloud Storage protocol"
38+
items:
39+
type: "string"
40+
type: "array"
41+
required:
42+
- "protocols"
43+
type: "object"
44+
status:
45+
properties:
46+
bucketName:
47+
description: "BucketName is the name of the provisioned Bucket in response\nto this BucketClaim. It is generated and set by the COSI controller\nbefore making the creation request to the OSP backend."
48+
type: "string"
49+
bucketReady:
50+
description: "BucketReady indicates that the bucket is ready for consumpotion\nby workloads"
51+
type: "boolean"
52+
required:
53+
- "bucketReady"
54+
type: "object"
55+
type: "object"
56+
served: true
57+
storage: true
58+
subresources:
59+
status: {}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
apiVersion: "apiextensions.k8s.io/v1"
2+
kind: "CustomResourceDefinition"
3+
metadata:
4+
annotations:
5+
controller-gen.kubebuilder.io/version: "v0.16.4"
6+
name: "bucketclasses.objectstorage.k8s.io"
7+
spec:
8+
group: "objectstorage.k8s.io"
9+
names:
10+
kind: "BucketClass"
11+
listKind: "BucketClassList"
12+
plural: "bucketclasses"
13+
singular: "bucketclass"
14+
scope: "Cluster"
15+
versions:
16+
- name: "v1alpha1"
17+
schema:
18+
openAPIV3Schema:
19+
properties:
20+
apiVersion:
21+
description: "APIVersion defines the versioned schema of this representation of an object.\nServers should convert recognized schemas to the latest internal value, and\nmay reject unrecognized values.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources"
22+
type: "string"
23+
deletionPolicy:
24+
default: "Retain"
25+
description: "DeletionPolicy is used to specify how COSI should handle deletion of this\nbucket. There are 2 possible values:\n - Retain: Indicates that the bucket should not be deleted from the OSP\n - Delete: Indicates that the bucket should be deleted from the OSP\n once all the workloads accessing this bucket are done"
26+
type: "string"
27+
driverName:
28+
description: "DriverName is the name of driver associated with this bucket"
29+
type: "string"
30+
kind:
31+
description: "Kind is a string value representing the REST resource this object represents.\nServers may infer this from the endpoint the client submits requests to.\nCannot be updated.\nIn CamelCase.\nMore info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"
32+
type: "string"
33+
metadata:
34+
type: "object"
35+
parameters:
36+
additionalProperties:
37+
type: "string"
38+
description: "Parameters is an opaque map for passing in configuration to a driver\nfor creating the bucket"
39+
type: "object"
40+
required:
41+
- "deletionPolicy"
42+
- "driverName"
43+
type: "object"
44+
served: true
45+
storage: true

0 commit comments

Comments
 (0)