Skip to content
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

Refactor volume mount logic #1264

Open
wants to merge 74 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 72 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
27f0b32
Replacing the storage class with pv
satr Nov 12, 2024
9c9d98f
Replacing the storage class with pv
satr Nov 13, 2024
6bf84c4
Added blobfuse properties
satr Nov 13, 2024
2a0e905
Added blobfuse properties
satr Nov 13, 2024
9ba8425
Added blobfuse properties
satr Nov 15, 2024
8fbc630
Merge remote-tracking branch 'origin/master' into refactor-volume-mou…
satr Nov 25, 2024
2ccb43f
Added blobfuse properties
satr Nov 25, 2024
98dde7c
Added blobfuse properties
satr Nov 26, 2024
9df11d0
Added blobfuse properties
satr Nov 27, 2024
e6acdf3
Removed support for deprecated volume mount blob. Changing logic to c…
satr Dec 2, 2024
f2545e0
Changing logic to create pvc and pv
satr Dec 3, 2024
cf9199a
Fixed unit test, regenerated types
satr Dec 4, 2024
426939b
Correcting pv, pvc logic and tests
satr Dec 5, 2024
39d48ed
Correcting unit-tests
satr Dec 6, 2024
49390b8
Correcting unit-tests
satr Dec 6, 2024
51a9f06
Correcting unit-tests
satr Dec 6, 2024
38ee3f4
Correcting unit-tests
satr Dec 9, 2024
cb6f145
Correcting unit-tests
satr Dec 9, 2024
119618e
Correcting unit-tests
satr Dec 9, 2024
6bc9ef7
Correcting unit-tests
satr Dec 9, 2024
cbff180
Correcting unit-tests
satr Dec 9, 2024
9962370
Correcting unit-tests
satr Dec 9, 2024
0e892d4
Correcting unit-tests
satr Dec 9, 2024
bf3d0a9
Correcting unit-tests
satr Dec 9, 2024
bfde517
Correcting unit-tests
satr Dec 10, 2024
b2bcb85
Correcting unit-tests
satr Dec 10, 2024
6c95cb4
Merge remote-tracking branch 'origin/master' into refactor-volume-mou…
satr Dec 12, 2024
a6d960e
Fixing unit-tests
satr Dec 12, 2024
88c2246
Updated ref
satr Dec 12, 2024
b79f6bc
Updated ref
satr Dec 13, 2024
124570b
Fixed unit tests
satr Dec 13, 2024
a7d09df
Fixed unit tests
satr Dec 13, 2024
f2ce6be
Fixed unit tests
satr Dec 13, 2024
5554640
Added yq install
satr Dec 16, 2024
1fc3ac6
Restored tests
satr Dec 16, 2024
0ed4852
Fixed comparison of existing auto-provisioned and manually created pv-s
satr Dec 19, 2024
c3e8c15
Merge remote-tracking branch 'origin/master' into refactor-volume-mou…
satr Dec 19, 2024
5f88172
Removed deploy receiver from volumes
satr Dec 19, 2024
36606ce
Moving volumounts to own package
satr Dec 19, 2024
143d551
Moving volumounts to own package
satr Dec 20, 2024
f0c4ae0
Fixing volumes for jobs
satr Dec 20, 2024
7461bd8
Fixing not created job aux deployment
satr Jan 2, 2025
325c24f
Fixed not created job volumes
satr Jan 3, 2025
6dec631
Extended job aux resource
satr Jan 3, 2025
89b154f
Merge remote-tracking branch 'origin/extend-job-aux-resource' into re…
satr Jan 3, 2025
8a9d402
Extended job aux resource
satr Jan 3, 2025
a792f6f
Merge remote-tracking branch 'origin/extend-job-aux-resource' into re…
satr Jan 3, 2025
f92d84b
Cleanup
satr Jan 3, 2025
6a33899
Merge remote-tracking branch 'origin/master' into refactor-volume-mou…
satr Jan 3, 2025
f8208d6
Cleanup
satr Jan 3, 2025
b649fe0
Reuse of job aux volumes
satr Jan 3, 2025
1ce04a3
Fixed unit-tests
satr Jan 6, 2025
47a5caa
Fixing unit-tests
satr Jan 6, 2025
7516794
Fixing unit-tests
satr Jan 6, 2025
10e36f3
Fixing unit-tests
satr Jan 6, 2025
a33a865
Fixing unit-tests
satr Jan 7, 2025
0ec6425
Fixing unit-tests
satr Jan 7, 2025
900425a
Reuse existing pv and pvc for re-deployed job component
satr Jan 7, 2025
f87512d
Reuse existing pv and pvc for re-deployed job component
satr Jan 7, 2025
bcd6e67
Fixed replace of existing pv and pvc for changed volumeMount
satr Jan 8, 2025
8a896d4
Fixed replace of existing pv and pvc for changed volumeMount in job aux
satr Jan 8, 2025
a27e812
Set version. Cleanup
satr Jan 9, 2025
2c55285
Cleanup
satr Jan 9, 2025
8f10ac6
Uncommented unit-tests, fixed linter reported issues
satr Jan 10, 2025
e923201
Fixed unit-tests
satr Jan 10, 2025
ac69182
Correcting pv-pvc re-creation logic
satr Jan 13, 2025
b20aa7c
Correcting unit-tests
satr Jan 14, 2025
c05a0b8
Correcting unit-tests
satr Jan 14, 2025
d07121e
Cleaned outdated code
satr Jan 14, 2025
29f80a7
Cleaned outdated code
satr Jan 14, 2025
dcbb528
Cleanup
satr Jan 14, 2025
40a51e2
Cleanup
satr Jan 14, 2025
fe6adaa
Corrected comments. Deleted not supported AzureFile type and property
satr Jan 22, 2025
aa5cb3b
Suppressed linter alerts
satr Jan 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ verify-generate: bootstrap generate
HAS_GOLANGCI_LINT := $(shell command -v golangci-lint;)
HAS_MOCKGEN := $(shell command -v mockgen;)
HAS_CONTROLLER_GEN := $(shell command -v controller-gen;)
HAS_YQ := $(shell command -v yq;)

.PHONY: bootstrap
bootstrap: vendor
Expand All @@ -185,3 +186,6 @@ endif
ifndef HAS_CONTROLLER_GEN
go install sigs.k8s.io/controller-tools/cmd/[email protected]
endif
ifndef HAS_YQ
go install github.com/mikefarah/yq/v4@latest
endif
4 changes: 2 additions & 2 deletions charts/radix-operator/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: radix-operator
version: 1.48.3
appVersion: 1.68.3
version: 1.49.0
appVersion: 1.69.0
kubeVersion: ">=1.24.0"
description: Radix Operator
keywords:
Expand Down
164 changes: 114 additions & 50 deletions charts/radix-operator/templates/radixapplication.yaml

Large diffs are not rendered by default.

80 changes: 56 additions & 24 deletions charts/radix-operator/templates/radixdeployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1173,15 +1173,17 @@ spec:
description: |-
Access mode from a container to an external storage. ReadOnlyMany (default), ReadWriteOnce, ReadWriteMany.
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- ReadOnlyMany
- ReadWriteOnce
- ReadWriteMany
- ""
type: string
azureFile:
description: AzureFile settings for Azure File CSI driver
description: |-
AzureFile settings for Azure File CSI driver
Deprecated.
properties:
accessMode:
description: |-
Expand Down Expand Up @@ -1229,15 +1231,15 @@ spec:
description: |-
Binding mode from a container to an external storage. Immediate (default), WaitForFirstConsumer.
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- Immediate
- WaitForFirstConsumer
- ""
type: string
blobFuse2:
description: BlobFuse2 settings for Azure Storage FUSE
CSI driver
CSI driver with the protocol fuse2
properties:
accessMode:
description: |-
Expand Down Expand Up @@ -1271,14 +1273,17 @@ spec:
FUSE driver. Default is fuse2.
enum:
- fuse2
- nfs
- ""
type: string
requestsStorage:
description: |-
Requested size (opens new window)of allocated mounted volume. Default value is set to "1Mi" (1 megabyte). Current version of the driver does not affect mounted volume size
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim
type: string
resourceGroup:
description: ResourceGroup of a storage account. Applicable
when using a workload identity.
type: string
skuName:
description: |-
SKU Type of Azure storage.
Expand All @@ -1290,6 +1295,12 @@ spec:
- Standard_RAGRS
- ""
type: string
storageAccount:
description: Name of a storage account. It is mandatory
when using a workload identity. It is optional when
using Access Key, if it is not defined, it will
be configured in a secret.
type: string
streaming:
description: |-
Configure Streaming mode. Used for blobfuse2.
Expand Down Expand Up @@ -1363,7 +1374,7 @@ spec:
gid:
description: |-
GID defines the group ID (number) which will be set as owner of the mounted volume.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
name:
description: |-
Expand All @@ -1380,33 +1391,38 @@ spec:
requestsStorage:
description: |-
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
skuName:
description: |-
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
storage:
description: |-
Storage defines the name of the container in the external storage resource.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
type:
description: |-
Type defines the storage type.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- blob
- azure-blob
- azure-file
- ""
type: string
uid:
description: |-
UID defines the user ID (number) which will be set as owner of the mounted volume.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
useAzureIdentity:
description: UseAzureIdentity defines that credentials
for accessing Azure Key Vault will be acquired using
Azure Workload Identity instead of using a ClientID
and Secret.
type: boolean
required:
- name
- path
Expand Down Expand Up @@ -1820,15 +1836,17 @@ spec:
description: |-
Access mode from a container to an external storage. ReadOnlyMany (default), ReadWriteOnce, ReadWriteMany.
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- ReadOnlyMany
- ReadWriteOnce
- ReadWriteMany
- ""
type: string
azureFile:
description: AzureFile settings for Azure File CSI driver
description: |-
AzureFile settings for Azure File CSI driver
Deprecated.
properties:
accessMode:
description: |-
Expand Down Expand Up @@ -1876,15 +1894,15 @@ spec:
description: |-
Binding mode from a container to an external storage. Immediate (default), WaitForFirstConsumer.
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- Immediate
- WaitForFirstConsumer
- ""
type: string
blobFuse2:
description: BlobFuse2 settings for Azure Storage FUSE
CSI driver
CSI driver with the protocol fuse2
properties:
accessMode:
description: |-
Expand Down Expand Up @@ -1918,14 +1936,17 @@ spec:
FUSE driver. Default is fuse2.
enum:
- fuse2
- nfs
- ""
type: string
requestsStorage:
description: |-
Requested size (opens new window)of allocated mounted volume. Default value is set to "1Mi" (1 megabyte). Current version of the driver does not affect mounted volume size
More info: https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/#create-a-persistentvolumeclaim
type: string
resourceGroup:
description: ResourceGroup of a storage account. Applicable
when using a workload identity.
type: string
skuName:
description: |-
SKU Type of Azure storage.
Expand All @@ -1937,6 +1958,12 @@ spec:
- Standard_RAGRS
- ""
type: string
storageAccount:
description: Name of a storage account. It is mandatory
when using a workload identity. It is optional when
using Access Key, if it is not defined, it will
be configured in a secret.
type: string
streaming:
description: |-
Configure Streaming mode. Used for blobfuse2.
Expand Down Expand Up @@ -2010,7 +2037,7 @@ spec:
gid:
description: |-
GID defines the group ID (number) which will be set as owner of the mounted volume.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
name:
description: |-
Expand All @@ -2027,33 +2054,38 @@ spec:
requestsStorage:
description: |-
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
skuName:
description: |-
More info: https://www.radix.equinor.com/guides/volume-mounts/optional-settings/
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
storage:
description: |-
Storage defines the name of the container in the external storage resource.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
type:
description: |-
Type defines the storage type.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
enum:
- blob
- azure-blob
- azure-file
- ""
type: string
uid:
description: |-
UID defines the user ID (number) which will be set as owner of the mounted volume.
Deprecated, use BlobFuse2 or AzureFile instead.
Deprecated, use BlobFuse2 instead.
type: string
useAzureIdentity:
description: UseAzureIdentity defines that credentials
for accessing Azure Key Vault will be acquired using
Azure Workload Identity instead of using a ClientID
and Secret.
type: boolean
required:
- name
- path
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ toolchain go1.22.5
require (
dario.cat/mergo v1.0.1
github.com/cert-manager/cert-manager v1.15.4
github.com/equinor/radix-common v1.9.4
github.com/equinor/radix-common v1.9.5
github.com/golang/mock v1.6.0
github.com/google/go-cmp v0.6.0
github.com/google/uuid v1.6.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc h1:U9qPSI2PIWSS1
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/emicklei/go-restful/v3 v3.12.1 h1:PJMDIM/ak7btuL8Ex0iYET9hxM3CI2sjZtzpL63nKAU=
github.com/emicklei/go-restful/v3 v3.12.1/go.mod h1:6n3XBCmQQb25CM2LCACGz8ukIrRry+4bhvbpWn3mrbc=
github.com/equinor/radix-common v1.9.4 h1:ErSnB2tqlRwaQuQdaA0qzsReDtHDgubcvqRO098ncEw=
github.com/equinor/radix-common v1.9.4/go.mod h1:+g0Wj0D40zz29DjNkYKVmCVeYy4OsFWKI7Qi9rA6kpY=
github.com/equinor/radix-common v1.9.5 h1:p1xldkYUoavwIMguoxxOyVkOXLPA6K8qMsgzeztQtQw=
github.com/equinor/radix-common v1.9.5/go.mod h1:+g0Wj0D40zz29DjNkYKVmCVeYy4OsFWKI7Qi9rA6kpY=
github.com/evanphx/json-patch v5.9.0+incompatible h1:fBXyNpNMuTTDdquAq/uisOr2lShz4oaXpDTX2bLe7ls=
github.com/evanphx/json-patch v5.9.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk=
github.com/evanphx/json-patch/v5 v5.9.0 h1:kcBlZQbplgElYIlo/n1hJbls2z/1awpXxpRi0/FOJfg=
Expand Down
Loading
Loading