some unfinished and untested work over helm mirror
This commit is contained in:
17
config/helm/scraper/test/examples/upgrade/Makefile
Normal file
17
config/helm/scraper/test/examples/upgrade/Makefile
Normal file
@@ -0,0 +1,17 @@
|
||||
default: test
|
||||
|
||||
include ../../../helpers/examples.mk
|
||||
|
||||
CHART := apm-server
|
||||
RELEASE := helm-apm-server-upgrade
|
||||
# K8S 1.22 doesn't support anymore rbac.authorization.k8s.io/v1beta1 used in 7.9.0
|
||||
FROM := 7.10.0
|
||||
|
||||
install:
|
||||
../../../helpers/upgrade.sh --chart $(CHART) --release $(RELEASE) --from $(FROM)
|
||||
kubectl rollout status deployment $(RELEASE)-apm-server
|
||||
|
||||
test: install goss
|
||||
|
||||
purge:
|
||||
helm del $(RELEASE)
|
||||
21
config/helm/scraper/test/examples/upgrade/README.md
Normal file
21
config/helm/scraper/test/examples/upgrade/README.md
Normal file
@@ -0,0 +1,21 @@
|
||||
# Upgrade
|
||||
|
||||
This example will deploy APM Server chart using an old chart version,
|
||||
then upgrade it.
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
* Add the Elastic Helm charts repo: `helm repo add elastic https://helm.elastic.co`
|
||||
|
||||
* Deploy [Elasticsearch Helm chart][]: `helm install elasticsearch elastic/elasticsearch`
|
||||
|
||||
* Deploy and upgrade APM Server chart with the default values: `make install`
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
You can also run [goss integration tests][] using `make test`.
|
||||
|
||||
|
||||
[goss integration tests]: https://github.com/elastic/helm-charts/tree/main/apm-server/examples/upgrade/test/goss.yaml
|
||||
6
config/helm/scraper/test/examples/upgrade/test/goss.yaml
Normal file
6
config/helm/scraper/test/examples/upgrade/test/goss.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
http:
|
||||
http://localhost:8200?pretty:
|
||||
status: 200
|
||||
timeout: 2000
|
||||
body:
|
||||
- "8.5.1"
|
||||
26
config/helm/scraper/test/examples/upgrade/values.yaml
Normal file
26
config/helm/scraper/test/examples/upgrade/values.yaml
Normal file
@@ -0,0 +1,26 @@
|
||||
---
|
||||
apmConfig:
|
||||
apm-server.yml: |
|
||||
apm-server:
|
||||
host: "0.0.0.0:8200"
|
||||
|
||||
queue: {}
|
||||
output.file:
|
||||
enabled: false
|
||||
|
||||
output.elasticsearch:
|
||||
hosts: ["http://upgrade-master:9200"]
|
||||
username: "${ELASTICSEARCH_USERNAME}"
|
||||
password: "${ELASTICSEARCH_PASSWORD}"
|
||||
|
||||
extraEnvs:
|
||||
- name: "ELASTICSEARCH_USERNAME"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: upgrade-master-credentials
|
||||
key: username
|
||||
- name: "ELASTICSEARCH_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: upgrade-master-credentials
|
||||
key: password
|
||||
Reference in New Issue
Block a user