Skip to content

Commit

Permalink
1.1.0 release plus testing procedure (#110)
Browse files Browse the repository at this point in the history
* 1.1.0 release plus testing procedure

* Update RELEASING.md

Co-authored-by: Trent Mick <[email protected]>

* Update RELEASING.md

* build: bump dependencies (#113)

* build: bump dependencies

* build: bump go version used in dockerfile

* build: bump go version

* 1.1.0 release plus testing procedure

* Update RELEASING.md

Co-authored-by: Trent Mick <[email protected]>

* Update RELEASING.md

---------

Co-authored-by: Trent Mick <[email protected]>
Co-authored-by: kruskall <[email protected]>
  • Loading branch information
3 people authored Aug 6, 2024
1 parent 7c7c66a commit 2d3c0d9
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 3 deletions.
54 changes: 53 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# How to release apm-k8s-attacher

0. Make sure everything is working by testing "main". (TODO: Clarify a manual testing procedure if one is required beyond automated tests.)
0. Make sure everything is working by testing "main" (test procedure below).
1. Create a PR for the release (named "release N.M.P" or whatever):
- Update the `version:` at "./charts/apm-attacher/Chart.yaml", e.g. "1.2.3".
- Update the `image.tag:` at "./charts/apm-attacher/values.yaml", e.g. "v1.2.3".
Expand All @@ -26,3 +26,55 @@
helm repo update elastic
helm search repo -l elastic/apm-attacher
```
## Testing procedure (for Linux, Windows works too but you need to adjust how files are created or create them manually)
1. Clone (or update) the repo locally
- `git clone https://github.com/elastic/apm-k8s-attacher.git`
2. `cd apm-k8s-attacher`
3. Create the custom values ymal file - replacing the secret token and url with valid values for a server is better, but even with these dummy values testing still works, just the agent won't connect to a server
```
cat > custom.yaml <<EOF
apm:
secret_token: SuP3RT0K3N
namespaces:
- default
webhookConfig:
agents:
java:
environment:
ELASTIC_APM_SERVER_URL: "https://apm-example.com:8200"
ELASTIC_APM_ENVIRONMENT: "prod"
ELASTIC_APM_LOG_LEVEL: "info"
EOF
```
4. Install the attacher - note the namespace can be any namespace but can't be the default nor a namespace where pods will be tested
- `helm install test-main charts/apm-attacher --values custom.yaml --namespace=elastic-apm --create-namespace`
5. Create a pod to test - the example here is a Java pod which uses a known image that holds a testing app
```
cat > test-app.yaml <<EOF
apiVersion: v1
kind: Pod
metadata:
name: test-app
annotations:
co.elastic.apm/attach: java
labels:
app: test-app
spec:
containers:
- image: docker.elastic.co/demos/apm/k8s-webhook-test
imagePullPolicy: Always
name: test-app
env:
- name: ELASTIC_APM_TRACE_METHODS
value: "test.Testing#methodB"
EOF
```
6. Start the app and check the logs
- `kubectl apply -f test-app.yaml`
- `kubectl logs test-app`
- and look for a log line that shows the agent has started, eg `co.elastic.apm.agent.configuration.StartupInfo - Starting Elastic APM`
7. Cleanup
- `kubectl delete -f test-app.yaml`
- `helm delete test-main -n elastic-apm`
2 changes: 1 addition & 1 deletion charts/apm-attacher/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: apm-attacher
type: application
version: "1.0.0"
version: "1.1.0"
description: A Helm chart installing the Elastic APM Kubernetes Attacher.
sources:
- https://github.com/elastic/apm-k8s-attacher
2 changes: 1 addition & 1 deletion charts/apm-attacher/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
image:
repository: docker.elastic.co/observability/apm-attacher
tag: "v1.0.0"
tag: "v1.1.0"
pullPolicy: Always
pullSecrets: []

Expand Down

0 comments on commit 2d3c0d9

Please sign in to comment.