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.
fix: remove resolvedOfferings, defaults, and scheduling for container…
…s not defined in app (#2468) Signed-off-by: Grant Linville <[email protected]>
- Loading branch information
1 parent
9761944
commit 3964bbc
Showing
22 changed files
with
649 additions
and
0 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
9 changes: 9 additions & 0 deletions
9
pkg/controller/defaults/testdata/memory/removed-container/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,9 @@ | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace | ||
spec: {} | ||
status: | ||
defaultRegion: local | ||
supportedRegions: | ||
- local |
62 changes: 62 additions & 0 deletions
62
pkg/controller/defaults/testdata/memory/removed-container/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,62 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: AppInstance | ||
metadata: | ||
creationTimestamp: null | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
memory: | ||
oneimage: 1048576 | ||
status: | ||
appImage: | ||
buildContext: {} | ||
id: test | ||
imageData: {} | ||
vcs: {} | ||
appSpec: | ||
containers: | ||
oneimage: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: image-name | ||
metrics: {} | ||
ports: | ||
- port: 80 | ||
protocol: http | ||
targetPort: 81 | ||
probes: null | ||
sidecars: | ||
left: | ||
image: foo | ||
metrics: {} | ||
ports: | ||
- port: 90 | ||
protocol: tcp | ||
targetPort: 91 | ||
probes: null | ||
appStatus: {} | ||
columns: {} | ||
conditions: | ||
reason: Success | ||
status: "True" | ||
success: true | ||
type: defaults | ||
defaults: | ||
memory: | ||
"": 0 | ||
left: 0 | ||
oneimage: 0 | ||
region: local | ||
namespace: app-created-namespace | ||
observedGeneration: 1 | ||
resolvedOfferings: {} | ||
staged: | ||
appImage: | ||
buildContext: {} | ||
imageData: {} | ||
vcs: {} | ||
summary: {} | ||
` |
36 changes: 36 additions & 0 deletions
36
pkg/controller/defaults/testdata/memory/removed-container/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,36 @@ | ||
kind: AppInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
memory: | ||
oneimage: 1048576 # 1Mi | ||
status: | ||
observedGeneration: 1 | ||
namespace: app-created-namespace | ||
appImage: | ||
id: test | ||
appSpec: | ||
containers: | ||
oneimage: | ||
sidecars: | ||
left: | ||
image: "foo" | ||
ports: | ||
- port: 90 | ||
targetPort: 91 | ||
protocol: tcp | ||
ports: | ||
- port: 80 | ||
targetPort: 81 | ||
protocol: http | ||
image: "image-name" | ||
build: | ||
dockerfile: "Dockerfile" | ||
context: "." | ||
defaults: | ||
memory: | ||
twoimage: 0 |
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
9 changes: 9 additions & 0 deletions
9
pkg/controller/resolvedofferings/testdata/computeclass/removed-container/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,9 @@ | ||
kind: ProjectInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-namespace | ||
spec: {} | ||
status: | ||
defaultRegion: local | ||
supportedRegions: | ||
- local |
65 changes: 65 additions & 0 deletions
65
pkg/controller/resolvedofferings/testdata/computeclass/removed-container/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,65 @@ | ||
`apiVersion: internal.acorn.io/v1 | ||
kind: AppInstance | ||
metadata: | ||
creationTimestamp: null | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
memory: | ||
oneimage: 1048576 | ||
status: | ||
appImage: | ||
buildContext: {} | ||
id: test | ||
imageData: {} | ||
vcs: {} | ||
appSpec: | ||
containers: | ||
oneimage: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile | ||
image: image-name | ||
metrics: {} | ||
ports: | ||
- port: 80 | ||
protocol: http | ||
targetPort: 81 | ||
probes: null | ||
sidecars: | ||
left: | ||
image: foo | ||
metrics: {} | ||
ports: | ||
- port: 90 | ||
protocol: tcp | ||
targetPort: 91 | ||
probes: null | ||
appStatus: {} | ||
columns: {} | ||
conditions: | ||
reason: Success | ||
status: "True" | ||
success: true | ||
type: resolved-offerings | ||
defaults: {} | ||
namespace: app-created-namespace | ||
observedGeneration: 1 | ||
resolvedOfferings: | ||
containers: | ||
"": | ||
memory: 0 | ||
left: | ||
memory: 0 | ||
oneimage: | ||
memory: 1048576 | ||
region: local | ||
staged: | ||
appImage: | ||
buildContext: {} | ||
imageData: {} | ||
vcs: {} | ||
summary: {} | ||
` |
37 changes: 37 additions & 0 deletions
37
pkg/controller/resolvedofferings/testdata/computeclass/removed-container/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,37 @@ | ||
kind: AppInstance | ||
apiVersion: internal.acorn.io/v1 | ||
metadata: | ||
name: app-name | ||
namespace: app-namespace | ||
uid: 1234567890abcdef | ||
spec: | ||
image: test | ||
memory: | ||
oneimage: 1048576 # 1Mi | ||
status: | ||
observedGeneration: 1 | ||
namespace: app-created-namespace | ||
appImage: | ||
id: test | ||
appSpec: | ||
containers: | ||
oneimage: | ||
sidecars: | ||
left: | ||
image: "foo" | ||
ports: | ||
- port: 90 | ||
targetPort: 91 | ||
protocol: tcp | ||
ports: | ||
- port: 80 | ||
targetPort: 81 | ||
protocol: http | ||
image: "image-name" | ||
build: | ||
dockerfile: "Dockerfile" | ||
context: "." | ||
resolvedOfferings: | ||
containers: | ||
twoimage: | ||
memory: 0 |
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
20 changes: 20 additions & 0 deletions
20
pkg/controller/scheduling/testdata/computeclass/removed-container/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,20 @@ | ||
--- | ||
kind: ClusterComputeClassInstance | ||
apiVersion: internal.admin.acorn.io/v1 | ||
metadata: | ||
name: sample-compute-class | ||
description: Simple description for a simple ComputeClass | ||
cpuScaler: 0.25 | ||
memory: | ||
min: 1Mi # 1Mi | ||
max: 2Mi # 2Mi | ||
default: 1Mi # 1Mi | ||
affinity: | ||
nodeAffinity: | ||
requiredDuringSchedulingIgnoredDuringExecution: | ||
nodeSelectorTerms: | ||
- matchExpressions: | ||
- key: foo | ||
operator: In | ||
values: | ||
- bar |
Oops, something went wrong.