Skip to content

Commit

Permalink
Renamed the helm chart to azurestorageexplorer
Browse files Browse the repository at this point in the history
  • Loading branch information
sebagomez committed Oct 15, 2021
1 parent 12ef31d commit 247374c
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 29 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/helm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ jobs:
run: |
build_number=$(./version.sh)
echo $build_number
sed -i -E "s/appVersion:.*/appVersion: \"$build_number\"/" ./helm/azureexplorer/Chart.yaml
sed -i -E "s/version:.*/version: \"$build_number\"/" ./helm/azureexplorer/Chart.yaml
sed -i -E "s/ tag:.*/ tag: \"$build_number\"/" ./helm/azureexplorer/values.yaml
sed -i -E "s/appVersion:.*/appVersion: \"$build_number\"/" ./helm/azurestorageexplorer/Chart.yaml
sed -i -E "s/version:.*/version: \"$build_number\"/" ./helm/azurestorageexplorer/Chart.yaml
sed -i -E "s/ tag:.*/ tag: \"$build_number\"/" ./helm/azurestorageexplorer/values.yaml
- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.2.1
Expand Down
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,28 @@ To fire a container with the latest version just run the following command

Then open your browser and navigate to http://localhost:5555, and voilá!

## Kubernetes

As of version 2.7.1 there's a new Helm chart with this project ready to be deployed in your favorite K8s cluster.
If you want this app to run in your cluster, make sure you have [helm](https://helm.sh/docs/intro/install/) installed on your system.

Add the repo

`helm repo add sebagomez https://sebagomez.github.io/azurestorageexplorer`

Install the chart

`helm install azurestorageexplorer sebagomez/azurestorageexplorer`

The helm chart provides a deployment and a service. If you're running locally with minikube just open the port-forwarding feature with
`minikube service azurestorageexplorer`

or

PORT-FORWARDING WITH KUBECTL

Thanks to [this repo](https://github.com/int128/helm-github-pages) for the info and detailed steps on how to create your own Helm repo with GitHub pages.

## Run locally

If you want to run this site on your own environment, don't want to clone it, and don't want to get into Docker (seriously, go learn some Docker), you can now do the following:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: azureexplorer
name: azurestorageexplorer
description: A Helm chart for Kubernetes

# A chart can be either an 'application' or a 'library' chart.
Expand All @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.1
version: 0.1.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "azureexplorer.fullname" . }})
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "azurestorageexplorer.fullname" . }})
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
echo http://$NODE_IP:$NODE_PORT
{{- else if contains "LoadBalancer" .Values.service.type }}
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "azureexplorer.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "azureexplorer.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "azurestorageexplorer.fullname" . }}'
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "azurestorageexplorer.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
echo http://$SERVICE_IP:{{ .Values.service.port }}
{{- else if contains "ClusterIP" .Values.service.type }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "azureexplorer.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "azurestorageexplorer.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "azureexplorer.name" -}}
{{- define "azurestorageexplorer.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

Expand All @@ -10,7 +10,7 @@ Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "azureexplorer.fullname" -}}
{{- define "azurestorageexplorer.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
Expand All @@ -26,16 +26,16 @@ If release name contains chart name it will be used as a full name.
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "azureexplorer.chart" -}}
{{- define "azurestorageexplorer.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "azureexplorer.labels" -}}
helm.sh/chart: {{ include "azureexplorer.chart" . }}
{{ include "azureexplorer.selectorLabels" . }}
{{- define "azurestorageexplorer.labels" -}}
helm.sh/chart: {{ include "azurestorageexplorer.chart" . }}
{{ include "azurestorageexplorer.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
Expand All @@ -45,17 +45,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }}
{{/*
Selector labels
*/}}
{{- define "azureexplorer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "azureexplorer.name" . }}
{{- define "azurestorageexplorer.selectorLabels" -}}
app.kubernetes.io/name: {{ include "azurestorageexplorer.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "azureexplorer.serviceAccountName" -}}
{{- define "azurestorageexplorer.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "azureexplorer.fullname" .) .Values.serviceAccount.name }}
{{- default (include "azurestorageexplorer.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "azureexplorer.fullname" . }}
name: {{ include "azurestorageexplorer.fullname" . }}
labels:
{{- include "azureexplorer.labels" . | nindent 4 }}
{{- include "azurestorageexplorer.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "azureexplorer.selectorLabels" . | nindent 6 }}
{{- include "azurestorageexplorer.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "azureexplorer.selectorLabels" . | nindent 8 }}
{{- include "azurestorageexplorer.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "azureexplorer.serviceAccountName" . }}
serviceAccountName: {{ include "azurestorageexplorer.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "azureexplorer.fullname" . }}
name: {{ include "azurestorageexplorer.fullname" . }}
labels:
{{- include "azureexplorer.labels" . | nindent 4 }}
{{- include "azurestorageexplorer.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
Expand All @@ -12,4 +12,4 @@ spec:
protocol: TCP
name: http
selector:
{{- include "azureexplorer.selectorLabels" . | nindent 4 }}
{{- include "azurestorageexplorer.selectorLabels" . | nindent 4 }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Default values for azureexplorer.
# Default values for azurestorageexplorer.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

Expand All @@ -8,7 +8,7 @@ image:
repository: sebagomez/azurestorageexplorer
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "2.6.0"
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down

0 comments on commit 247374c

Please sign in to comment.