Skip to content

Commit

Permalink
Add chart v1.2.0 (#63)
Browse files Browse the repository at this point in the history
Signed-off-by: zwzhang0107 <zuoweizhang@outlook.com>
  • Loading branch information
zwzhang0107 committed Apr 6, 2023
1 parent a8b1b04 commit cc57172
Show file tree
Hide file tree
Showing 32 changed files with 4,326 additions and 0 deletions.
23 changes: 23 additions & 0 deletions versions/v1.2.0/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
14 changes: 14 additions & 0 deletions versions/v1.2.0/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: koordinator
description: A Helm chart for Koordinator
type: application
version: 1.2.0
appVersion: 1.2.0
icon: https://koordinator.sh/img/logo.svg
keywords:
- koordinator
- co-location
- mixed-workloads
home: https://koordinator.sh
sources:
- https://github.com/koordinator-sh/koordinator
85 changes: 85 additions & 0 deletions versions/v1.2.0/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Koordinator v1.2.0

## Configuration

Note that installing this chart directly means it will use the default template values for Koordinator.

You may have to set your specific configurations if it is deployed into a production cluster, or you want to configure feature-gates.

### Optional: chart parameters

The following table lists the configurable parameters of the chart and their default values.

| Parameter | Description | Default |
| ----------------------------------------- | ---------------------------------------------------------------- |---------------------------------|
| `featureGates` | Feature gates for Koordinator, empty string means all by default | ` ` |
| `installation.namespace` | namespace for Koordinator installation | `koordinator-system` |
| `installation.createNamespace` | Whether to create the installation.namespace | `true` |
| `imageRepositoryHost` | Image repository host | `ghcr.io` |
| `manager.log.level` | Log level that koord-manager printed | `4` |
| `manager.replicas` | Replicas of koord-manager deployment | `2` |
| `manager.image.repository` | Repository for koord-manager image | `koordinatorsh/koord-manager` |
| `manager.image.tag` | Tag for koord-manager image | `v1.2.0` |
| `manager.resources.limits.cpu` | CPU resource limit of koord-manager container | `1000m` |
| `manager.resources.limits.memory` | Memory resource limit of koord-manager container | `1Gi` |
| `manager.resources.requests.cpu` | CPU resource request of koord-manager container | `500m` |
| `manager.resources.requests.memory` | Memory resource request of koord-manager container | `256Mi` |
| `manager.metrics.port` | Port of metrics served | `8080` |
| `manager.webhook.port` | Port of webhook served | `9443` |
| `manager.nodeAffinity` | Node affinity policy for koord-manager pod | `{}` |
| `manager.nodeSelector` | Node labels for koord-manager pod | `{}` |
| `manager.tolerations` | Tolerations for koord-manager pod | `[]` |
| `manager.resyncPeriod` | Resync period of informer koord-manager, defaults no resync | `0` |
| `manager.hostNetwork` | Whether koord-manager pod should run with hostnetwork | `false` |
| `scheduler.log.level` | Log level that koord-scheduler printed | `4` |
| `scheduler.replicas` | Replicas of koord-scheduler deployment | `2` |
| `scheduler.image.repository` | Repository for koord-scheduler image | `koordinatorsh/koord-scheduler` |
| `scheduler.image.tag` | Tag for koord-scheduler image | `v1.2.0` |
| `scheduler.resources.limits.cpu` | CPU resource limit of koord-scheduler container | `1000m` |
| `scheduler.resources.limits.memory` | Memory resource limit of koord-scheduler container | `1Gi` |
| `scheduler.resources.requests.cpu` | CPU resource request of koord-scheduler container | `500m` |
| `scheduler.resources.requests.memory` | Memory resource request of koord-scheduler container | `256Mi` |
| `scheduler.port` | Port of metrics served | `10251` |
| `scheduler.nodeAffinity` | Node affinity policy for koord-scheduler pod | `{}` |
| `scheduler.nodeSelector` | Node labels for koord-scheduler pod | `{}` |
| `scheduler.tolerations` | Tolerations for koord-scheduler pod | `[]` |
| `scheduler.hostNetwork` | Whether koord-scheduler pod should run with hostnetwork | `false` |
| `koordlet.log.level` | Log level that koordlet printed | `4` |
| `koordlet.image.repository` | Repository for koordlet image | `koordinatorsh/koordlet` |
| `koordlet.image.tag` | Tag for koordlet image | `v1.2.0` |
| `koordlet.resources.limits.cpu` | CPU resource limit of koordlet container | `500m` |
| `koordlet.resources.limits.memory` | Memory resource limit of koordlet container | `256Mi` |
| `koordlet.resources.requests.cpu` | CPU resource request of koordlet container | `0` |
| `koordlet.resources.requests.memory` | Memory resource request of koordlet container | `0` |
| `webhookConfiguration.failurePolicy.pods` | The failurePolicy for pods in mutating webhook configuration | `Ignore` |
| `webhookConfiguration.timeoutSeconds` | The timeoutSeconds for all webhook configuration | `30` |
| `crds.managed` | Koordinator will not install CRDs with chart if this is false | `true` |
| `imagePullSecrets` | The list of image pull secrets for koordinator image | `false` |

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or `helm upgrade`.

### Optional: feature-gate

Feature-gate controls some influential features in Koordinator:

| Name | Description | Default | Effect (if closed) |
| ------------------------- | ---------------------------------------------------------------- | ------- | -------------------------------------- |
| `PodMutatingWebhook` | Whether to open a mutating webhook for Pod **create** | `true` | Don't inject koordinator.sh/qosClass, koordinator.sh/priority and don't replace koordinator extend resources ad so on |
| `PodValidatingWebhook` | Whether to open a validating webhook for Pod **create/update** | `true` | It is possible to create some Pods that do not conform to the Koordinator specification, causing some unpredictable problems |


If you want to configure the feature-gate, just set the parameter when install or upgrade. Such as:

```bash
$ helm install koordinator https://... --set featureGates="PodMutatingWebhook=true\,PodValidatingWebhook=true"
```

If you want to enable all feature-gates, set the parameter as `featureGates=AllAlpha=true`.

### Optional: the local image for China

If you are in China and have problem to pull image from official DockerHub, you can use the registry hosted on Alibaba Cloud:

```bash
$ helm install koordinator https://... --set imageRepositoryHost=registry.cn-beijing.aliyuncs.com
```
97 changes: 97 additions & 0 deletions versions/v1.2.0/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "koordinator.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "koordinator.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "koordinator.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "koordinator.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "koordinator.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}

{{/*
Lookup existing immutatble resources
*/}}
{{- define "webhookServiceSpec" -}}
{{- $service := lookup "v1" "Service" .Values.installation.namespace "koordinator-webhook-service" -}}
{{- if $service -}}
{{ if $service.spec.clusterIP -}}
clusterIP: {{ $service.spec.clusterIP }}
{{- end }}
{{ if $service.spec.clusterIPs -}}
clusterIPs:
{{ $service.spec.clusterIPs }}
{{- end }}
{{ if $service.spec.ipFamilyPolicy -}}
ipFamilyPolicy: {{ $service.spec.ipFamilyPolicy }}
{{- end }}
{{ if $service.spec.ipFamilies -}}
ipFamilies:
{{ $service.spec.ipFamilies }}
{{- end }}
{{ if $service.spec.type -}}
type: {{ $service.spec.type }}
{{- end }}
{{ if $service.spec.ipFamily -}}
ipFamily: {{ $service.spec.ipFamily }}
{{- end }}
{{- end -}}
ports:
- port: 443
targetPort: {{ .Values.manager.webhook.port }}
selector:
koord-app: koord-manager
{{- end -}}

{{- define "webhookSecretData" -}}
{{- $secret := lookup "v1" "Secret" .Values.installation.namespace "koordinator-webhook-certs" -}}
{{- if $secret -}}
data:
{{- range $k, $v := $secret.data }}
{{ $k }}: {{ $v }}
{{- end }}
{{- end }}
{{- end -}}

{{- define "serviceAccountManager" -}}
{{- $sa := lookup "v1" "ServiceAccount" .Values.installation.namespace "koord-manager" -}}
{{- if $sa -}}
secrets:
{{- range $v := $sa.secrets }}
- name: {{ $v.name }}
{{- end }}
{{- end }}
{{- end -}}
Loading

0 comments on commit cc57172

Please sign in to comment.