Skip to content

feat: COSI controller Addon #1008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jan 14, 2025
Merged

feat: COSI controller Addon #1008

merged 6 commits into from
Jan 14, 2025

Conversation

dkoshkin
Copy link
Contributor

@dkoshkin dkoshkin commented Jan 7, 2025

What problem does this PR solve?:
This PR adds the COSI controller Addon, without any providers.
The chart comes from https://github.com/mesosphere/charts/tree/master/stable/cosi

The addon does not take in any configuration so the API to enable it is just:

apiVersion: cluster.x-k8s.io/v1beta1
kind: Cluster
metadata:
  name: <NAME>
spec:
  topology:
    variables:
      - name: clusterConfig
        value:
          addons:
            cosi: {}

Once we add providers, the API can be similar to what it is with CSI with a providers: field.

Which issue(s) this PR fixes:
Fixes #

How Has This Been Tested?:

New unit tests.
Also deployed it on a Nutanix Cluster and the Nutanix COSI driver from nutanix-cloud-native/cosi-driver-nutanix#375

Create the credentials Secret

apiVersion: v1
kind: Secret
metadata:
  annotations:
  labels:
  name: objectstorage-provisioner
  namespace: cosi-driver-nutanix
stringData:
  ACCESS_KEY: "<>"
  ACCOUNT_NAME: "<>"
  ENDPOINT: "http://10.1.1.1:80"
  PC_SECRET: "<>:9440:<>:<>"
  SECRET_KEY: "<>"
type: Opaque
NUTANIX_COSI_DIR=<>
helm install cosi-driver -n cosi-driver-nutanix --create-namespace --set=secret.enabled=false --set=cosiController.enabled=false --skip-crds$NUTANIX_COSI_DIR/charts/

kubectl apply -f $NUTANIX_COSI_DIR/project/examples/bucketclass.yaml
kubectl apply -f $NUTANIX_COSI_DIR/project/examples/bucketclaim.yaml
kubectl apply -f $NUTANIX_COSI_DIR/project/examples/bucketaccessclass.yaml
kubectl apply -f $NUTANIX_COSI_DIR/project/examples/bucketaccess.yaml

# From https://github.com/nutanix-cloud-native/cosi-driver-nutanix/pull/374
kubectl apply -f https://raw.githubusercontent.com/nutanix-cloud-native/cosi-driver-nutanix/944ce9ba66bc34e59bd94519a88da8bf9fae3d0c/project/examples/awscliapppod.yaml

The Secret was correctly generated and the test Pod wrote and read to a new bucket.

$ kubectl logs awscli
Defaulted container "awscli" out of: awscli, write-aws-credentials (init), write-test-file (init)
+ aws s3 ls
2025-01-07 20:43:31 sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747
++ cat /tmp/test-directory/file.txt
+ readonly BUCKET_NAME=sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747
+ BUCKET_NAME=sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747
++ date +%Y%m%d_%H%M%S
+ readonly FILE_NAME=20250107_205233.txt
+ FILE_NAME=20250107_205233.txt
+ aws s3 cp /tmp/test-directory/file.txt s3://sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747/20250107_205233.txt
upload: ../tmp/test-directory/file.txt to s3://sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747/20250107_205233.txt
+ aws s3 cp s3://sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747/20250107_205233.txt -
sample-bucketclass8ce19295-f704-45bb-a533-15591c55a747

Special notes for your reviewer:

@dkoshkin dkoshkin force-pushed the dkoshkin/feat-cosi-addon branch 2 times, most recently from 488e7f6 to 06f097f Compare January 7, 2025 21:50
@faiq faiq enabled auto-merge (squash) January 14, 2025 18:47
@faiq faiq merged commit a209459 into main Jan 14, 2025
21 checks passed
@faiq faiq deleted the dkoshkin/feat-cosi-addon branch January 14, 2025 18:47
@github-actions github-actions bot mentioned this pull request Jan 14, 2025
dkoshkin added a commit that referenced this pull request Jan 16, 2025
🤖 I have created a release *beep* *boop*
---


## 0.25.0 (2025-01-16)

<!-- Release notes generated using configuration in .github/release.yaml
at main -->

## What's Changed
### Exciting New Features 🎉
* feat: Virtual IP configuration to set different address/port by
@dkoshkin in
#986
* feat: update addon versions by @dkoshkin in
#997
* feat: COSI controller Addon by @dkoshkin in
#1008
### Fixes 🔧
* fix: check HelmReleaseReadyCondition when status is up-to-date by
@dkoshkin in
#989
* fix: update CoreDNS mapping file by @dkoshkin in
#998
* fix: validates PC IP is outside Load Balancer IP Range by
@manoj-nutanix in
#1001
* fix: update COSI controller image to fix CVEs by @dkoshkin in
#1012
* fix(deps): Update Nutanix CCM Version by @thunderboltsid in
#1016
* fix: update AWS CCM to latest versions by @dkoshkin in
#1013
### Other Changes
* refactor: new waiter functionality in helmAddonApplier by @dkoshkin in
#988
* build: Properly ignore ntnx API client from dependabot by @jimmidyson
in
#995


**Full Changelog**:
v0.24.0...v0.25.0

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
jimmidyson pushed a commit that referenced this pull request Jan 20, 2025
**What problem does this PR solve?**:
Missed this in
#1008
since I thought that all HCP are already checked.

**Which issue(s) this PR fixes**:
Fixes #

**How Has This Been Tested?**:
<!--
Please describe the tests that you ran to verify your changes.
Provide output from the tests and any manual steps needed to replicate
the tests.
-->

**Special notes for your reviewer**:
<!--
Use this to provide any additional information to the reviewers.
This may include:
- Best way to review the PR.
- Where the author wants the most review attention on.
- etc.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants