Skip to content

Commit ad4bea9

Browse files
authored
Merge pull request #3 from zqzten/v0.3
kapacity-manager v0.3.0 #release
2 parents b831aec + 48b9950 commit ad4bea9

9 files changed

+31
-19
lines changed

.github/workflows/ci.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
python-version: 3.9
2323
check-latest: true
2424
- name: Set up chart-testing
25-
uses: helm/chart-testing-action@v2.4.0
25+
uses: helm/chart-testing-action@v2
2626
- name: Run chart-testing (list-changed)
2727
id: list-changed
2828
run: |
@@ -35,7 +35,7 @@ jobs:
3535
run: ct lint --config ct.yaml
3636
- name: Create kind cluster
3737
if: steps.list-changed.outputs.changed == 'true'
38-
uses: helm/kind-action@v1.7.0
38+
uses: helm/kind-action@v1
3939
- name: Install dependencies
4040
if: steps.list-changed.outputs.changed == 'true'
4141
run: |
@@ -44,4 +44,4 @@ jobs:
4444
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.12.0 --wait --set installCRDs=true
4545
- name: Run chart-testing (install)
4646
if: steps.list-changed.outputs.changed == 'true'
47-
run: ct install --config ct.yaml
47+
run: ct install --config ct.yaml --helm-extra-args "--timeout 10m"

.github/workflows/release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
with:
2525
version: v3.12.0
2626
- name: Run chart-releaser
27-
uses: helm/chart-releaser-action@v1.5.0
27+
uses: helm/chart-releaser-action@v1
2828
with:
2929
charts_dir: charts
3030
config: cr.yaml

charts/kapacity-manager/Chart.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.2.0
18+
version: 0.3.0
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: v0.2.0
24+
appVersion: v0.3.0

charts/kapacity-manager/templates/crds/autoscaling.kapacitystack.io_horizontalportraits.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ spec:
3737
description: Algorithm is the algorithm for which to use to generate the portrait.
3838
properties:
3939
config:
40-
additionalProperties:
41-
type: string
42-
description: 'Config is the general configuration data for arbitrary algorithm those used by external user-defined portraits. TODO: consider if we can make it structural'
40+
description: Config is the general configuration data for arbitrary algorithm those used by external portrait generators.
4341
type: object
42+
x-kubernetes-preserve-unknown-fields: true
4443
externalJob:
4544
description: ExternalJob is the configuration for ExternalJob algorithm.
4645
properties:
@@ -4389,6 +4388,9 @@ spec:
43894388
required:
43904389
- type
43914390
type: object
4391+
externalGeneratorName:
4392+
description: ExternalGeneratorName is the identifier of external controller which shall generate this portrait. External controllers should use this field to filter portraits to generate. Kapacity's built-in portrait generators would ignore portraits with this field set.
4393+
type: string
43924394
metrics:
43934395
description: Metrics contains the specifications for which to use to generate the portrait.
43944396
items:
@@ -4731,7 +4733,7 @@ spec:
47314733
type: object
47324734
type: array
47334735
portraitType:
4734-
description: PortraitType is the type of portrait. Different type has different portrait generating logic.
4736+
description: PortraitType is the type of portrait. Different type has different semantics with different portrait generating logic.
47354737
type: string
47364738
scaleTargetRef:
47374739
description: ScaleTargetRef points to the target resource to scale.

charts/kapacity-manager/templates/crds/autoscaling.kapacitystack.io_intelligenthorizontalpodautoscalers.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -232,10 +232,9 @@ spec:
232232
description: Algorithm is the algorithm for which to use to generate the portrait.
233233
properties:
234234
config:
235-
additionalProperties:
236-
type: string
237-
description: 'Config is the general configuration data for arbitrary algorithm those used by external user-defined portraits. TODO: consider if we can make it structural'
235+
description: Config is the general configuration data for arbitrary algorithm those used by external portrait generators.
238236
type: object
237+
x-kubernetes-preserve-unknown-fields: true
239238
externalJob:
240239
description: ExternalJob is the configuration for ExternalJob algorithm.
241240
properties:
@@ -4584,6 +4583,9 @@ spec:
45844583
required:
45854584
- type
45864585
type: object
4586+
externalGeneratorName:
4587+
description: ExternalGeneratorName is the identifier of external controller which shall generate this portrait. External controllers should use this field to filter portraits to generate. Kapacity's built-in portrait generators would ignore portraits with this field set.
4588+
type: string
45874589
metrics:
45884590
description: Metrics contains the specifications for which to use to generate the portrait.
45894591
items:
@@ -4926,7 +4928,7 @@ spec:
49264928
type: object
49274929
type: array
49284930
portraitType:
4929-
description: PortraitType is the type of portrait. Different type has different portrait generating logic.
4931+
description: PortraitType is the type of portrait. Different type has different semantics with different portrait generating logic.
49304932
type: string
49314933
required:
49324934
- algorithm

charts/kapacity-manager/templates/deployment.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ spec:
4040
- --metrics-bind-address=:8080
4141
- --health-probe-bind-address=:8081
4242
- --leader-elect
43+
- --kube-api-qps={{ .Values.kubeAPIQPS }}
44+
- --kube-api-burst={{ .Values.kubeAPIBurst }}
4345
- --reconcile-concurrency={{ .Values.reconcileConcurrency }}
4446
- --object-label-selector={{ .Values.objectSelector.label }}
4547
- --object-field-selector={{ .Values.objectSelector.field }}
@@ -73,7 +75,7 @@ spec:
7375
securityContext:
7476
{{- toYaml .Values.securityContext | nindent 12 }}
7577
{{- end }}
76-
image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
78+
image: "{{ .Values.image.registry }}/{{ .Values.image.repository.namespace }}/{{ .Values.image.repository.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
7779
imagePullPolicy: {{ .Values.image.pullPolicy }}
7880
ports:
7981
{{- if .Values.webhook.enabled }}

charts/kapacity-manager/templates/webhook.yaml

+3
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,10 @@ webhooks:
3737
- key: kubernetes.io/metadata.name
3838
operator: NotIn
3939
values:
40+
- kube-system
41+
{{- if ne .Release.Namespace "kube-system" }}
4042
- {{ .Release.Namespace }}
43+
{{- end }}
4144
rules:
4245
- apiGroups:
4346
- ""

charts/kapacity-manager/values.yaml

+7-3
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,15 @@ replicaCount: 1
66

77
image:
88
registry: ghcr.io
9-
repository: traas-stack/kapacity-manager
9+
repository:
10+
namespace: traas-stack
11+
name: kapacity-manager
1012
pullPolicy: IfNotPresent
1113
# Overrides the image tag whose default is the chart appVersion.
1214
tag: ""
1315

16+
kubeAPIQPS: 100
17+
kubeAPIBurst: 200
1418
reconcileConcurrency: 16
1519
objectSelector:
1620
label: ""
@@ -79,7 +83,7 @@ prometheus:
7983
- seriesQuery: '{__name__="kube_pod_status_ready"}'
8084
metricsQuery: sum(<<.Series>>{condition="true",<<.LabelMatchers>>})
8185
name:
82-
as: ready_pods_count
86+
as: kube_pod_status_ready
8387
resources:
8488
overrides:
8589
namespace:
@@ -106,7 +110,7 @@ algorithmJob:
106110
horizontalPredictive:
107111
registry: ghcr.io
108112
repository: traas-stack/kapacity-algorithm-horizontal-predictive
109-
tag: v0.1.0
113+
tag: v0.2.0
110114

111115
# Set a path to enable logging to disk.
112116
logPath: ""

ct.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
target-branch: main
22
validate-maintainers: false
3-
helm-extra-args: --timeout 10m

0 commit comments

Comments
 (0)