Open
Description
What would you like to be added?
apiVersion: resource.operator.kwok.x-k8s.io/v1alpha1
kind: Resource
metadata:
name: node-2c4g
spec:
templateName: node
replicas: 10
parameters:
allocatable:
cpu: 2
memory: 4Gi
---
apiVersion: resource.operator.kwok.x-k8s.io/v1alpha1
kind: Resource
metadata:
name: node-4c8g
spec:
templateName: node
replicas: 10
parameters:
allocatable:
cpu: 4
memory: 8Gi
---
apiVersion: resource.operator.kwok.x-k8s.io/v1alpha1
kind: ResourceTemplate
metadata:
name: node
spec:
parameters:
podCIDR: "10.0.0.1/24"
allocatable:
cpu: 32
memory: 256Gi
pods: 110
capacity: {}
nodeInfo:
architecture: amd64
operatingSystem: linux
template: |-
kind: Node
apiVersion: v1
metadata:
name: {{ Name }}
annotations:
kwok.x-k8s.io/node: fake
node.alpha.kubernetes.io/ttl: "0"
metrics.k8s.io/resource-metrics-path: "/metrics/nodes/{{ Name }}/metrics/resource"
labels:
beta.kubernetes.io/arch: {{ .nodeInfo.architecture }}
beta.kubernetes.io/os: {{ .nodeInfo.operatingSystem }}
kubernetes.io/arch: {{ .nodeInfo.architecture }}
kubernetes.io/hostname: {{ Name }}
kubernetes.io/os: {{ .nodeInfo.operatingSystem }}
kubernetes.io/role: agent
node-role.kubernetes.io/agent: ""
type: kwok
spec:
podCIDR: {{ AddCIDR .podCIDR Index }}
status:
allocatable:
{{ range $key, $value := .allocatable }}
{{ $key }}: {{ $value }}
{{ end }}
{{ $capacity := .capacity }}
capacity:
{{ range $key, $value := .allocatable }}
{{ $key }}: {{ or ( index $capacity $key ) $value }}
{{ end }}
nodeInfo:
{{ range $key, $value := .nodeInfo }}
{{ $key }}: {{ $value }}
{{ end }}
Why is this needed?
Metadata
Metadata
Assignees
Type
Projects
Status
📋 Backlog