-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Move supported resources from hard-coded to ConfigMap
- Loading branch information
dvirgilad
authored and
maromcohen
committed
Aug 28, 2024
1 parent
e343ccd
commit 3c2e120
Showing
25 changed files
with
142 additions
and
7 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 @@ | ||
f3706efb-ea7d-4e78-9c9a-d5412e55edb5 |
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 @@ | ||
01377e02-87b5-4dfc-b9bf-45ad94210c5c |
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 @@ | ||
486815d6-9bf7-43d8-9941-ebbe8df4ebca |
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 @@ | ||
24694e4e-6f3a-4950-a7b7-07ee167740da |
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 @@ | ||
47fb98b5-0962-49f4-809c-8373643e362a |
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 @@ | ||
af428c8f-4e9f-42e3-a1de-5be141c95bc4 |
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 @@ | ||
770b17c3-4aee-4c68-bdfe-86833661fdab |
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,11 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: quota-resources-config-map | ||
namespace: sns-system | ||
data: | ||
storage: "50Gi" | ||
cpu: '50' | ||
memory: "50Gi" | ||
pods: '50' | ||
gpu: '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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,24 @@ | ||
resources: | ||
- manager.yaml | ||
- manager.yaml | ||
|
||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
|
||
images: | ||
- name: controller | ||
newName: controller | ||
newTag: latest | ||
- name: controller | ||
newName: controller | ||
newTag: latest | ||
|
||
configMapGenerator: | ||
- literals: | ||
- PERMITTED_GROUPS='test' | ||
name: permitted-groups-cm | ||
- literals: | ||
- PERMITTED_GROUPS='test' | ||
name: permitted-groups-cm | ||
|
||
- name: quota-resources-config-map | ||
namespace: sns-system | ||
literals: | ||
- storage="50Gi" | ||
- cpu="50" | ||
- memory="50Gi" | ||
- pods="50" | ||
- gpu="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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRole | ||
metadata: | ||
name: configmap-role | ||
rules: | ||
- apiGroups: [""] | ||
resources: ["configmaps"] | ||
verbs: ["get", "list", "watch"] |
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,12 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: configmap-role-binding | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: configmap-role | ||
subjects: | ||
- kind: ServiceAccount | ||
name: sns-controller-manager | ||
namespace: sns-system |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
0cbeae48-24b6-4ea1-b7ec-a67ed1ce4356 |
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 @@ | ||
2a1947b0-da97-4283-a783-0b8e501a6276 |
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 @@ | ||
7478c10d-0a98-40db-9fa4-4d2c638e8403 |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
apiVersion: dana.hns.io/v1 | ||
kind: MigrationHierarchy | ||
metadata: | ||
name: 'braziltojapan' | ||
spec: | ||
currentns: 'brazil' | ||
tons: 'japan' |
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,10 @@ | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: brazil | ||
labels: | ||
dana.hns.io/role: leaf | ||
dana.hns.io/subnamespace: 'true' | ||
kubernetes.io/metadata.name: brazil | ||
dana.hns.io/parent: root-test | ||
dana.hns.io/resourcepool: 'false' |
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 @@ | ||
kind: Namespace | ||
apiVersion: v1 | ||
metadata: | ||
name: rootns | ||
labels: | ||
dana.hns.io/subnamespace: 'true' | ||
annotations: | ||
dana.hns.io/role: root | ||
openshift.io/display-name: rootns | ||
dana.hns.io/display-name: rootns | ||
dana.hns.io/crq-selector-0: rootns | ||
dana.hns.io/depth: '0' | ||
dana.hns.io/rq-depth: '1' |
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,15 @@ | ||
apiVersion: dana.hns.io/v1 | ||
kind: Subnamespace | ||
metadata: | ||
name: 'brazil' | ||
namespace: 'coffee' | ||
labels: | ||
dana.hns.io/resourcepool: 'false' | ||
spec: | ||
resourcequota: | ||
hard: | ||
cpu: '1' | ||
memory: 1Gi | ||
pods: 2 | ||
basic.storageclass.storage.k8s.io/requests.storage: 0 | ||
requests.nvidia.com/gpu: '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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
131ae9c2-868d-4961-b347-15bab54837d3 |
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 @@ | ||
apiVersion: dana.hns.io/v1 | ||
kind: Updatequota | ||
metadata: | ||
annotations: | ||
dana.hns.io/description: 'Moving resources for this great new project' | ||
namespace: brazil | ||
name: 'braziltojapan' | ||
spec: | ||
destns: japan | ||
resourcequota: | ||
hard: | ||
pods: '1' | ||
sourcens: brazil |