-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch provides the support for azure keyvault. We are using "libopenstorage/secrets" as the wrapper package to integrate with different kms and package provides the abstraction over several kms. It also provides the integraton support for azure and helps communication with azure key vault. We are required to provide the definition for house keeping calls registered calls with libopenstorage/secrets. "libopenstorage/secrets" does the creation of client handle based on the details provided in configmap. The certificate details present in the secret are preserved inside a temp file and used to establish the connection with azure key vault as of now. Below are the connection details that are going to be populated on Noobaa CR by `noobaa_system_reconciler` at ocs side and this is the ocs code where connectiondetails on Noobaa CR are built: https://github.com/red-hat-storage/ocs-operator/blob/2d082fc4c1ac4cec961406053cece448f4b07684/controllers/storagecluster/noobaa_system_reconciler.go#L249 ex: configmap data: ``` data: AZURE_CERT_SECRET_NAME: azure-ocs-ffwc9o1j AZURE_CLIENT_ID: az-client-id1 AZURE_TENANT_ID: az-tenant-id1 AZURE_VAULT_URL: az-valut-url1 KMS_PROVIDER: azure-kv KMS_SERVICE_NAME: kms-conn-azure1 ``` Signed-off-by: Vinayakswami Hariharmath <[email protected]>
- Loading branch information
Showing
12 changed files
with
467 additions
and
1,351 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: KMS Test - Azure Vault | ||
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
run-azure-vault-test: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 90 | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: "1.20" | ||
|
||
- name: Set environment variables | ||
run: | | ||
echo PATH=$PATH:$HOME/go/bin >> $GITHUB_ENV | ||
echo OPERATOR_IMAGE=localhost:5000/noobaa/noobaa-operator:integration >> $GITHUB_ENV | ||
- name: Deploy Dependencies | ||
run: | | ||
set -x | ||
bash .travis/install-5nodes-kind-cluster.sh | ||
go get -v github.com/onsi/ginkgo/ginkgo | ||
go install -mod=mod -v github.com/onsi/ginkgo/ginkgo | ||
ginkgo version | ||
- name: Build NooBaa | ||
run: | | ||
make cli | ||
make image | ||
docker tag noobaa/noobaa-operator:$(go run cmd/version/main.go) $OPERATOR_IMAGE | ||
docker push $OPERATOR_IMAGE | ||
- name: Install NooBaa | ||
run: | | ||
bash .travis/install-noobaa-pull-azure-parameters.sh | ||
- name: Run KMS Azure test | ||
run: make test-kms-azure-vault |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/sh | ||
set -o errexit | ||
|
||
|
||
# TODO: Replace it with azure key vault URL once we have Azure key vault | ||
# account is created | ||
echo AZURE_VAULT_URL="https://noobaa-vault.vault.azure.net/" >> $GITHUB_ENV | ||
|
||
echo "💬 Install NooBaa CRD" | ||
./build/_output/bin/noobaa-operator-local crd create | ||
|
||
echo "💬 Create NooBaa operator deployment" | ||
./build/_output/bin/noobaa-operator-local operator --operator-image=$OPERATOR_IMAGE install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.