Skip to content

Commit

Permalink
release 0.6.3 by forcing deploy to set config to /app (#21)
Browse files Browse the repository at this point in the history
* make deploy use --config /app/opslevel-k8s.yaml

* bump to ver 2024 3 4

* prefix v
  • Loading branch information
Taimoor Ahmad authored Mar 4, 2024
1 parent c6499dd commit d0d5402
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 11 deletions.
12 changes: 12 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
## Issues

<!-- paste an issue link here from github/gitlab -->

## Changelog

- [ ] List your changes here
- [ ] Make a `changie` entry

## Tophatting

<!-- paste in CLI output, log messages or screenshots showing your change works -->
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/opslevel-k8s.yaml
6 changes: 3 additions & 3 deletions charts/kubernetes-sync/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v2
name: kubernetes-sync
type: application
version: 0.6.2
appVersion: "2024.2.26"
description: An agent for syncronizing Kubernetes data with OpsLevel
version: 0.6.3
appVersion: "v2024.3.4"
description: An agent for synchronizing Kubernetes data with OpsLevel
keywords:
- monitoring
- alerting
Expand Down
46 changes: 40 additions & 6 deletions charts/kubernetes-sync/README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
Kubernetes Sync
---

This chart packages up [kubectl-opslevel](https://github.com/OpsLevel/kubectl-opslevel) and runs it as a `deployment` using the command `service reconcile` to attach to the Kubernetes event stream for any create and update events. These are then processed by the tool and resulting service data is sent OpsLevel.
This chart for [kubectl-opslevel](https://github.com/OpsLevel/kubectl-opslevel) creates a deployment
to run the app in the background using `$ kubectl-opslevel service reconcile`.

Make sure you have the [OpsLevel Helm chart](https://github.com/OpsLevel/helm-charts) repository added then you can perform an install with:
The app attaches to the Kubernetes event stream and listens for any create and update events.
These are then processed by the tool and the resulting service data is sent OpsLevel.

```
helm install sync opslevel/kubernetes-sync --namespace=opslevel --create-namespace --set-file sync.config=./opslevel-k8s.yaml --set apitoken=XXXXX
Make sure you have the [OpsLevel Helm chart](https://github.com/OpsLevel/helm-charts) repository added.

## Deploy

```bash
# double check that you are in the correct cluster
kctx

# double check that your config file is correct
cat opslevel-k8s.yaml

# export API token and desired namespace (defaults to 'opslevel')
OPSLEVEL_API_TOKEN="..." NAMESPACE="..."

#
# IF INSTALLING FOR THE FIRST TIME:
#
helm install sync opslevel/kubernetes-sync \
--namespace="${NAMESPACE:-opslevel}" \
--create-namespace \
--set-file sync.config=./opslevel-k8s.yaml \
--set apitoken="$OPSLEVEL_API_TOKEN"

#
# RE-DEPLOYS:
#
helm upgrade sync opslevel/kubernetes-sync \
--namespace="${NAMESPACE:-opslevel}" \
--set-file sync.config=./opslevel-k8s.yaml \
--set apitoken="$OPSLEVEL_API_TOKEN"
```

To upgrade
## Deploy without using our public container registry

To deploying using an image from your own registry, edit this line in [values.yaml](./values.yaml):

```
helm upgrade --namespace=opslevel --set-file sync.config=./opslevel-k8s.yaml --set apitoken=XXXXX sync opslevel/kubernetes-sync
image: public.ecr.aws/opslevel/kubectl-opslevel:v2024.3.4
```

and then deploy using `helm`.
2 changes: 2 additions & 0 deletions charts/kubernetes-sync/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ spec:
args:
- service
- reconcile
- --config
- /app/opslevel-k8s.yaml
{{- with .Values.sync.args }}
{{- toYaml . | nindent 10 }}
{{- end }}
Expand Down
4 changes: 2 additions & 2 deletions charts/kubernetes-sync/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apitokenPath:
apitokenSecret:
name: opslevel-api-token

image: public.ecr.aws/opslevel/kubectl-opslevel:v2024.2.26
image: public.ecr.aws/opslevel/kubectl-opslevel:v2024.3.4

sync:
args:
Expand Down Expand Up @@ -66,7 +66,7 @@ annotations:
opslevel.com/description: "A tool that enables you to import & reconcile services with OpsLevel from your Kubernetes clusters."
opslevel.com/language: "go"
opslevel.com/framework: "client-go"
opslevel.com/tags.app_version: "v2024.1.27"
opslevel.com/tags.app_version: "v2024.3.4"
securityContext: {}
resources: {}
nodeSelector: {}
Expand Down

0 comments on commit d0d5402

Please sign in to comment.