some unfinished and untested work over helm mirror
This commit is contained in:
13
config/helm/scraper/test/examples/security/Makefile
Normal file
13
config/helm/scraper/test/examples/security/Makefile
Normal file
@@ -0,0 +1,13 @@
|
||||
default: test
|
||||
|
||||
include ../../../helpers/examples.mk
|
||||
|
||||
RELEASE := helm-apm-server-security
|
||||
|
||||
install:
|
||||
helm upgrade --wait --timeout=$(TIMEOUT) --install --values values.yaml $(RELEASE) ../../
|
||||
|
||||
test: install goss
|
||||
|
||||
purge:
|
||||
helm del $(RELEASE)
|
||||
28
config/helm/scraper/test/examples/security/README.md
Normal file
28
config/helm/scraper/test/examples/security/README.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Security
|
||||
|
||||
This example deploy APM Server 8.5.1 using authentication and TLS to connect to
|
||||
Elasticsearch (see [values][]).
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
* Deploy [Elasticsearch Helm chart][].
|
||||
|
||||
* Deploy APM Server chart with security: `make install`
|
||||
|
||||
* You can now setup a port forward to query APM indices:
|
||||
|
||||
```
|
||||
kubectl port-forward svc/security-master 9200
|
||||
curl -u elastic:changeme https://localhost:9200/_cat/indices
|
||||
```
|
||||
|
||||
|
||||
## Testing
|
||||
|
||||
You can also run [goss integration tests][] using `make test`
|
||||
|
||||
|
||||
[elasticsearch helm chart]: https://github.com/elastic/helm-charts/tree/main/elasticsearch/examples/security/
|
||||
[goss integration tests]: https://github.com/elastic/helm-charts/tree/main/apm-server/examples/security/test/goss.yaml
|
||||
[values]: https://github.com/elastic/helm-charts/tree/main/apm-server/examples/security/values.yaml
|
||||
@@ -0,0 +1,6 @@
|
||||
http:
|
||||
http://localhost:8200?pretty:
|
||||
status: 200
|
||||
timeout: 2000
|
||||
body:
|
||||
- "8.5.1"
|
||||
29
config/helm/scraper/test/examples/security/values.yaml
Normal file
29
config/helm/scraper/test/examples/security/values.yaml
Normal file
@@ -0,0 +1,29 @@
|
||||
apmConfig:
|
||||
apm-server.yml: |
|
||||
apm-server:
|
||||
host: "0.0.0.0:8200"
|
||||
queue: {}
|
||||
output.elasticsearch:
|
||||
username: '${ELASTICSEARCH_USERNAME}'
|
||||
password: '${ELASTICSEARCH_PASSWORD}'
|
||||
protocol: https
|
||||
hosts: ["security-master:9200"]
|
||||
ssl.certificate_authorities:
|
||||
- /usr/share/apm-server/config/certs/elastic-certificate.pem
|
||||
|
||||
secretMounts:
|
||||
- name: elastic-certificate-pem
|
||||
secretName: elastic-certificate-pem
|
||||
path: /usr/share/apm-server/config/certs
|
||||
|
||||
extraEnvs:
|
||||
- name: "ELASTICSEARCH_USERNAME"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: security-master-credentials
|
||||
key: username
|
||||
- name: "ELASTICSEARCH_PASSWORD"
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: security-master-credentials
|
||||
key: password
|
||||
Reference in New Issue
Block a user