Skip to content

Commit 848c135

Browse files
authored
fix missing NodeSLO CRD (#15)
* fix missing NodeSLO CRD Signed-off-by: Tao Li <[email protected]> * fix chart-testing action Signed-off-by: Tao Li <[email protected]>
1 parent 159607c commit 848c135

File tree

2 files changed

+76
-13
lines changed

2 files changed

+76
-13
lines changed

.github/workflows/lint-and-test.yml

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,31 +21,24 @@ jobs:
2121

2222
- name: Setup Chart Linting
2323
id: lint
24-
uses: helm/chart-testing-action@v2.1.0
24+
uses: helm/chart-testing-action@v2.2.1
2525

26-
- name: List changed charts
26+
- name: Run chart-testing (list-changed)
2727
id: list-changed
2828
run: |
29-
## If executed with debug this won't work anymore.
30-
changed=$(ct --config ./.github/configs/ct-lint.yaml list-changed)
31-
charts=$(echo "$changed" | tr '\n' ' ' | xargs)
29+
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
3230
if [[ -n "$changed" ]]; then
3331
echo "::set-output name=changed::true"
34-
echo "::set-output name=changed_charts::$charts"
3532
fi
3633
- name: Run chart-testing (lint)
37-
run: ct lint --debug --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
34+
run: ct lint --debug --target-branch ${{ github.event.repository.default_branch }} --config ./.github/configs/ct-lint.yaml --lint-conf ./.github/configs/lintconf.yaml
3835

3936
- name: Create kind cluster
4037
uses: helm/[email protected]
4138
if: steps.list-changed.outputs.changed == 'true'
4239
with:
4340
config: .github/configs/kind-config.yaml
44-
- name: Skip HPA tests of ArgoCD
45-
if: contains(steps.list-changed.outputs.changed_charts, 'koordinator')
46-
run: |
47-
## Metrics API not available in kind cluster
48-
rm charts/argo-cd/ci/ha-autoscaling-values.yaml
41+
4942
- name: Run chart-testing (install)
50-
run: ct install --config ./.github/configs/ct-install.yaml
43+
run: ct install --target-branch ${{ github.event.repository.default_branch }} --config ./.github/configs/ct-install.yaml
5144
if: steps.list-changed.outputs.changed == 'true'
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{{- if .Values.crds.managed }}
2+
3+
---
4+
apiVersion: apiextensions.k8s.io/v1
5+
kind: CustomResourceDefinition
6+
metadata:
7+
annotations:
8+
controller-gen.kubebuilder.io/version: v0.8.0
9+
creationTimestamp: null
10+
name: nodeslos.slo.koordinator.sh
11+
spec:
12+
group: slo.koordinator.sh
13+
names:
14+
kind: NodeSLO
15+
listKind: NodeSLOList
16+
plural: nodeslos
17+
singular: nodeslo
18+
scope: Cluster
19+
versions:
20+
- name: v1alpha1
21+
schema:
22+
openAPIV3Schema:
23+
description: NodeSLO is the Schema for the nodeslos API
24+
properties:
25+
apiVersion:
26+
description: 'APIVersion defines the versioned schema of this representation
27+
of an object. Servers should convert recognized schemas to the latest
28+
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
29+
type: string
30+
kind:
31+
description: 'Kind is a string value representing the REST resource this
32+
object represents. Servers may infer this from the endpoint the client
33+
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
34+
type: string
35+
metadata:
36+
type: object
37+
spec:
38+
description: NodeSLOSpec defines the desired state of NodeSLO
39+
properties:
40+
resourceUsedThresholdWithBE:
41+
description: BE pods will be limited if node resource usage overload
42+
properties:
43+
cpuSuppressPolicy:
44+
description: CPUSuppressPolicy
45+
type: string
46+
cpuSuppressThresholdPercent:
47+
description: cpu suppress threshold percentage (0,100), default
48+
= 65
49+
format: int64
50+
type: integer
51+
enable:
52+
description: whether the strategy is enabled, default = true
53+
type: boolean
54+
type: object
55+
type: object
56+
status:
57+
description: NodeSLOStatus defines the observed state of NodeSLO
58+
type: object
59+
type: object
60+
served: true
61+
storage: true
62+
subresources:
63+
status: {}
64+
status:
65+
acceptedNames:
66+
kind: ""
67+
plural: ""
68+
conditions: []
69+
storedVersions: []
70+
{{- end }}

0 commit comments

Comments
 (0)