1
+
2
+ chart-lint-report.txt : values.yaml templates
3
+ docker run -ti --rm -w /pcm -v ` realpath $( PWD) /../..` :/pcm quay.io/helmpack/chart-testing ct lint --charts deployment/pcm --validate-maintainers=false | tee chart-lint-report.txt
4
+
5
+ #
6
+ # kind cluster targets
7
+ #
1
8
# https://stackoverflow.com/questions/649246/is-it-possible-to-create-a-multi-line-string-variable-in-a-makefile
2
9
define KIND_EXTRA_MOUNTS
3
10
nodes:
7
14
containerPath: /sys/fs/resctrl
8
15
endef
9
16
10
- chart-lint-report.txt : values.yaml templates
11
- docker run -ti --rm -w /pcm -v ` realpath $( PWD) /../..` :/pcm quay.io/helmpack/chart-testing ct lint --charts deployment/pcm --validate-maintainers=false | tee chart-lint-report.txt
12
-
13
17
export KIND_EXTRA_MOUNTS
14
18
_kind_with_registry.sh :
15
19
curl -sl https://kind.sigs.k8s.io/examples/kind-with-registry.sh -o _kind_with_registry.sh.tmp
@@ -23,79 +27,103 @@ _kind_deploy_cluster: _kind_with_registry.sh
23
27
touch _kind_deploy_cluster
24
28
25
29
26
- clean :
27
- kind delete cluster
28
- docker rm -f kind-registry
29
- rm -fv _kind_with_registry.sh
30
- rm -fv _kind_extra_mounts.txt
31
- rm -fv _kind_with_registry.sh.tmp
32
- rm -fv _kind_deploy_cluster
33
- rm -fv _kind_deploy_prometheus
34
- rm -fv _kind_deploy_pcm
35
-
36
-
37
30
#
38
- # e2e-small : minimal E2e pcm pod only test
31
+ # 1) e2e-default : minimal E2e pcm pod only test
39
32
#
40
- _kind_deploy_pcm :
33
+ kind_deploy_pcm :
41
34
helm install pcm .
42
- touch _kind_deploy_pcm
35
+ kubectl wait daemonset pcm --for=jsonpath= ' {.status.numberReady} ' =1
43
36
44
37
kind_pcm_test :
45
38
helm test pcm
46
39
47
- e2e-small : _kind_deploy_cluster _kind_deploy_pcm kind_pcm_test
40
+ e2e-default : _kind_deploy_cluster kind_deploy_pcm kind_pcm_test
48
41
49
42
#
50
- # e2e-small-metal-nfd : minimal E2e pcm pod only test but with direct approach
43
+ # 2) e2e-default-local-image : minimal E2e pcm with local image build
51
44
#
52
- _kind_deploy_pcm_metal :
53
- helm upgrade --install pcm . -f values-metal.yaml
54
- touch _kind_deploy_pcm_metal
45
+ build_local_image :
46
+ (cd ../.. ; docker build . -t localhost:5001/pcm-local)
47
+ docker push localhost:5001/pcm-local
55
48
56
- _kind_deploy_nfd :
57
- helm upgrade --install pcm . -f values-metal.yaml
58
- touch _kind_deploy_pcm_metal
49
+ kind_deploy_pcm_local_image :
50
+ helm upgrade --install --reset-values --wait pcm . -f values-local-image.yaml
51
+ kubectl wait daemonset pcm --for=jsonpath=' {.spec.template.spec.containers[0].image' }=localhost:5001/pcm-local:latest
52
+ kubectl wait daemonset pcm --for=jsonpath=' {.status.numberReady}' =1
59
53
60
- kind_pcm_test :
61
- helm test pcm
62
-
63
- e2e-small-metal : _kind_deploy_cluster _kind_deploy_pcm_metal kind_pcm_test
54
+ e2e-default-local-image : _kind_deploy_cluster build_local_image kind_deploy_pcm_local_image kind_pcm_test
64
55
65
56
#
66
- # e2e-prometheus: E2E test for podMonitor (pod monitor test)
57
+ # 3) e2e-prometheus: E2E test for podMonitor (pod monitor test)
67
58
#
68
59
_kind_deploy_prometheus :
69
60
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
70
- helm upgrade --install prometheus prometheus-community/kube-prometheus-stack --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false
71
- kubectl wait sts prometheus-prometheus-kube-prometheus-prometheus --for=jsonpath=' {.status.replicas}' =1
61
+ helm upgrade --install --reset-values prometheus prometheus-community/kube-prometheus-stack --set prometheus.prometheusSpec.podMonitorSelectorNilUsesHelmValues=false --wait
62
+ kubectl wait Prometheus prometheus-kube-prometheus-prometheus --for=jsonpath=' {.status.availableReplicas}' =1
63
+ # kubectl wait sts prometheus-prometheus-kube-prometheus-prometheus --for=jsonpath='{.status.replicas}'=1
72
64
touch _kind_deploy_prometheus
73
65
74
- _kind_deploy_pcm-with-prometheus :
75
- helm upgrade --install pcm . --set podMonitor=true
66
+ kind_deploy_pcm_with_prometheus :
67
+ helm upgrade --install --reset-values pcm . --set podMonitor=true
68
+ kubectl wait daemonset pcm --for=jsonpath=' {.status.numberReady}' =1
69
+
70
+ kind_pcm_test_prometheus :
71
+ kubectl proxy & sleep 10 && curl -sL http://127.0.0.1:8001/api/v1/namespaces/default/services/prometheus-kube-prometheus-prometheus:http-web/proxy/api/v1/query? query=Measurement_Interval_in_us | grep Measurement_Interval_in_us && kill %1
76
72
77
- kind_pcm_prometheus_test :
78
- kubectl proxy & sleep 5 && curl -sL http://127.0.0.1:8001/api/v1/namespaces/default/services/prometheus-kube-prometheus-prometheus:http-web/proxy/api/v1/query? query=Measurement_Interval_in_us | grep Measurement_Interval_in_us && kill %1
73
+ e2e-prometheus : _kind_deploy_cluster _kind_deploy_prometheus kind_deploy_pcm_with_prometheus kind_pcm_test kind_pcm_test_prometheus
74
+
75
+ #
76
+ # 4) e2e-metal-nfd: e2e thats tests that with node-feature-discovery installed and nfd values are changed, the PCM will be only installed on non hyperviserd system with Intel vendor and RDT available
77
+ #
78
+ _kind_deploy_nfd :
79
+ # kubectl apply -k https://github.com/kubernetes-sigs/node-feature-discovery/deployment/overlays/default?ref=v0.16.0-devel
80
+ helm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts
81
+ helm upgrade --install --wait nfd nfd/node-feature-discovery --namespace node-feature-discovery --create-namespace
82
+ # please be patient NFD requires around 2 minutes to annotate the node ...
83
+ kubectl wait node --timeout=2m kind-control-plane --for=jsonpath=' {.metadata.labels.feature\.node\.kubernetes\.io\/cpu-model\.vendor_id}' =Intel
84
+
85
+ kind_deploy_pcm_with_metal_nfd :
86
+ helm upgrade --install --reset-values pcm . -f values-metal-nfd.yaml
87
+ kubectl wait daemonset --timeout=2m pcm --for=jsonpath=' {.status.numberReady}' =1
88
+
89
+ kind_pcm_test_nfd :
90
+ kubectl wait daemonset pcm --timeout=2m --for=jsonpath=' {.spec.template.spec.nodeSelector.feature\.node\.kubernetes\.io\/cpu-model\.vendor_id}' =Intel
91
+ helm test pcm
79
92
80
- e2e-prometheus : _kind_deploy_cluster _kind_deploy_prometheus _kind_deploy_pcm-with-prometheus kind_pcm_test kind_pcm_prometheus_test
93
+ e2e-metal-nfd : _kind_deploy_cluster _kind_deploy_nfd kind_deploy_pcm_with_metal_nfd kind_pcm_test
81
94
82
95
#
83
- # e2e-vpa: VPA E2E tests
96
+ # 5) e2e-vpa: VPA E2E tests
84
97
#
85
98
_kind_autoscaler :
86
99
git clone --depth 1 --single-branch https://github.com/kubernetes/autoscaler _kind_autoscaler
87
100
88
101
_kind_deploy_metrics_server :
89
102
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
90
103
helm repo update
91
- helm upgrade --install --set args={--kubelet-insecure-tls} metrics-server metrics-server/metrics-server --namespace kube-system
104
+ helm upgrade --install --reset-values --set args={--kubelet-insecure-tls} metrics-server metrics-server/metrics-server --namespace kube-system
105
+ kubectl wait daemonset pcm --for=jsonpath=' {.status.numberReady}' =1
92
106
touch _kind_deploy_metrics_server
93
107
94
108
_kind_deploy_vpa : autoscaler
95
109
./_kind_autoscaler/vertical-pod-autoscaler/hack/vpa-up.sh
96
110
touch _kind_deploy_vpa
97
111
98
- _kind_deploy_pcm_with_vpa :
99
- helm upgrade --install pcm . --set verticalPodAutoscaler.enabled=true
112
+ kind_deploy_pcm_with_vpa :
113
+ helm upgrade --install --reset-values pcm . --set verticalPodAutoscaler.enabled=true
114
+ kubectl wait daemonset pcm --for=jsonpath=' {.status.numberReady}' =1
115
+
116
+ e2e-vpa : _kind_deploy_cluster _kind_deploy_vpa kind_deploy_pcm_with_vpa kind_pcm_test
117
+
118
+ #
119
+ # Cleanup
120
+ #
100
121
101
- e2e-vpa : _kind_deploy_cluster _kind_deploy_vpa _kind_deploy_pcm_with_vpa kind_pcm_test
122
+ clean :
123
+ kind delete cluster
124
+ docker rm -f kind-registry
125
+ rm -fv _kind_with_registry.sh
126
+ rm -fv _kind_extra_mounts.txt
127
+ rm -fv _kind_with_registry.sh.tmp
128
+ rm -fv _kind_deploy_cluster
129
+ rm -fv _kind_deploy_prometheus
0 commit comments