This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2297 from tylerslaton/volume-class-defaults
Only set Status.Defaults.Volumes if it hasn't been set
- Loading branch information
Showing
38 changed files
with
185 additions
and
101 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
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
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
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
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
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
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
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
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
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
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
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 |
---|---|---|
|
@@ -38,7 +38,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
accessModes: | ||
|
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
24 changes: 24 additions & 0 deletions
24
pkg/controller/defaults/testdata/volumeclass/volume-class-defaults-set/existing.yaml
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,24 @@ | ||
--- | ||
kind: ProjectVolumeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: test-volume-class | ||
namespace: app-namespace | ||
description: Just a simple test volume class | ||
default: true | ||
storageClassName: test-storage-class | ||
size: | ||
min: 1Gi | ||
max: 10Gi | ||
default: 2Gi | ||
allowedAccessModes: ["readWriteOnce"] | ||
--- | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace | ||
spec: {} | ||
status: | ||
defaultRegion: local | ||
supportedRegions: | ||
- local |
54 changes: 54 additions & 0 deletions
54
pkg/controller/defaults/testdata/volumeclass/volume-class-defaults-set/expected.golden
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,54 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: AppInstance | ||
metadata: | ||
creationTimestamp: null | ||
generation: 2 | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
status: | ||
appImage: | ||
buildContext: {} | ||
id: test | ||
imageData: {} | ||
vcs: {} | ||
appSpec: | ||
containers: | ||
container-name: | ||
dirs: | ||
/var/tmp: | ||
secret: {} | ||
volume: foo | ||
image: image-name | ||
metrics: {} | ||
probes: null | ||
volumes: | ||
foo: {} | ||
appStatus: {} | ||
columns: {} | ||
conditions: | ||
observedGeneration: 2 | ||
reason: Success | ||
status: "True" | ||
success: true | ||
type: defaults | ||
defaults: | ||
memory: | ||
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumes: | ||
foo: | ||
class: test-volume-class | ||
size: 4Gi | ||
namespace: app-created-namespace | ||
observedGeneration: 1 | ||
staged: | ||
appImage: | ||
buildContext: {} | ||
imageData: {} | ||
vcs: {} | ||
summary: {} | ||
` |
26 changes: 26 additions & 0 deletions
26
pkg/controller/defaults/testdata/volumeclass/volume-class-defaults-set/input.yaml
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,26 @@ | ||
kind: AppInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
generation: 2 | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
status: | ||
observedGeneration: 1 | ||
namespace: app-created-namespace | ||
appImage: | ||
id: test | ||
appSpec: | ||
containers: | ||
container-name: | ||
image: "image-name" | ||
dirs: | ||
"/var/tmp": | ||
volume: foo | ||
defaults: | ||
volumes: | ||
foo: | ||
class: test-volume-class | ||
size: 4Gi |
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 |
---|---|---|
|
@@ -37,7 +37,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
accessModes: | ||
|
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 |
---|---|---|
|
@@ -41,7 +41,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
accessModes: | ||
|
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 |
---|---|---|
|
@@ -38,7 +38,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
accessModes: | ||
|
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 |
---|---|---|
|
@@ -37,7 +37,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
accessModes: | ||
|
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 |
---|---|---|
|
@@ -40,7 +40,6 @@ status: | |
"": 0 | ||
container-name: 0 | ||
region: local | ||
volumeSize: 10G | ||
volumes: | ||
foo: | ||
size: 2Gi | ||
|
Oops, something went wrong.