Skip to content

Commit

Permalink
clean up helm chart (#7)
Browse files Browse the repository at this point in the history
* clean up helm chart

* remove service account

* updat helm charts

* update

* fix readme

* update readme and push with tag in wokflow

* update readme

* move service keys inside ind. keys

* update keys

* update manager and proxy key naming to deployment

* Revert "update manager and proxy key naming to deployment"

This reverts commit 7296af7.

* address comments
  • Loading branch information
ishaan-tf authored Jul 24, 2024
1 parent 1759b4b commit a6735b5
Show file tree
Hide file tree
Showing 25 changed files with 252 additions and 991 deletions.
46 changes: 0 additions & 46 deletions .github/workflows/gopls.yml

This file was deleted.

34 changes: 34 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release Elasti Helm Chart

on:
push:
tags:
- elasti-helm-v*

jobs:
release:
permissions:
contents: write # to push chart release and create a release (helm/chart-releaser-action)

runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Set up Helm
uses: azure/setup-helm@v4
with:
version: v3.15.3

- name: Run chart-releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.TRUEFOUNDRY_HELM_TOKEN }}"
CR_SKIP_EXISTING: true
71 changes: 19 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,39 +33,37 @@ TBA

# Installation / Deployment on K8s

You will be able to install the Elasti Tool by following command
You can install the Elasti Tool by running the following command:
```bash
make deploy

or

kubectl apply -f install.yaml
helm install elasti ./charts/elasti -n elasti
```

After this, you can start creating elastiService, you can find a sample at `demo-elastiService.yaml`
After this, you can start creating elastiService. You can find a sample at `demo-elastiService.yaml`.

# Uninstallation
## Uninstallation

For this, **you will need to remove all the CRDs first. **
Post that, just delete the install file.
To uninstall Elasti, **you will need to remove all the CRDs first.** Then, simply delete the installation file.
```bash
make undeploy

or

kubectl delete -f install.yaml
helm uninstall elasti -n elasti
```

# Development

Here are the steps to deploy Elasti in your kubernetes cluster.
For now, we will need to deploy the Elasti-Operator and Elasti-Resolver separately.
Here are the steps to deploy Elasti in your Kubernetes cluster. For now, we will need to deploy the Elasti-Operator and Elasti-Resolver separately.

### Setup Docker

This is required to publish our docker images, and pull them inside our manifest files.
This is required to publish our Docker images and pull them inside our manifest files.

1. Login to the docker hub via CLI.
1. Login to the Docker Hub via CLI.
```bash
docker login -u ramantehlan
# When asked for password, paste below text.
Expand All @@ -78,8 +76,8 @@ dckr_pat_WgMJEsO0nMNp10Bf7rLQ_FcVzLU

We will build and publish our resolver changes.

1. Go into resolver directory.
2. Run build and publish command.
1. Go into the resolver directory.
2. Run the build and publish command.
```bash
make docker-buildx IMG=ramantehlan/elasti-resolver:v1alpha1
```
Expand All @@ -88,22 +86,22 @@ make docker-buildx IMG=ramantehlan/elasti-resolver:v1alpha1

We will build and publish our Operator changes.

1. Go into operator directory.
2. Run build and publish command.
1. Go into the operator directory.
2. Run the build and publish command.
```bash
make docker-buildx IMG=ramantehlan/elasti-operator:v1alpha1
```

> Once your changes are published, you can re-deploy in your cluster.
> Once your changes are published, you can re-deploy them in your cluster.
# Configuration
TBA

# Playground

```
make docker-build docker-publish IMG=localhost:5001/elasti-operator:v1alpha1
make docker-build docker-publish IMG=localhost:5001/elasti-resolver:v1alpha1
make docker-build docker-publish IMG=localhost:5001/elasti-operator:v1alpha1
make docker-build docker-publish IMG=localhost:5001/elasti-resolver:v1alpha1
```

# Icon
Expand All @@ -121,17 +119,17 @@ kubectl apply -f https://github.com/argoproj/argo-rollouts/releases/latest/downl
```

```
helm upgrade --install promstack prometheus-community/kube-prometheus-stack -f prom-stack.yaml
helm upgrade --install promstack prometheus-community/kube-prometheus-stack -f prom-stack.yaml
helm upgrade --install prometheus prometheus-community/prometheus --version 25.24.0 -f prometheus.yaml -n prometheus
helm upgrade --install grafana grafana/grafana -n prometheus
kubectl get secret --namespace prometheus grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
kubectl get secret --namespace prometheus grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echo
kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_alertmanagers.yaml
kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_probes.yaml
kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_prometheuses.yaml
Expand All @@ -143,34 +141,3 @@ kubectl apply -f example/prometheus-operator-crd/monitoring.coreos.com_thanosrul
```

































19 changes: 4 additions & 15 deletions charts/elasti/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Expand the name of the chart.
*/}}
{{- define "elasti.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- default .Chart.Name .Values.global.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Expand All @@ -11,10 +11,10 @@ We truncate at 63 chars because some Kubernetes name fields are limited to this
If release name contains chart name it will be used as a full name.
*/}}
{{- define "elasti.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- if .Values.global.fullnameOverride }}
{{- .Values.global.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- $name := default .Chart.Name .Values.global.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand Down Expand Up @@ -49,14 +49,3 @@ Selector labels
app.kubernetes.io/name: {{ include "elasti.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "elasti.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "elasti.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading

0 comments on commit a6735b5

Please sign in to comment.