Skip to content

Commit

Permalink
Updated ingress to released and updated values.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaswilde committed Nov 26, 2020
1 parent e625b1e commit 5b47269
Show file tree
Hide file tree
Showing 8 changed files with 87 additions and 33 deletions.
2 changes: 1 addition & 1 deletion charts/installer/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
apiVersion: v2
appVersion: 0.2.9
version: 0.1.7
version: 0.1.8
name: installer
description: Quickly install pre-compiled binaries from Github releases.
home: "https://github.com/nicholaswilde/helm-charts/tree/main/charts/installer"
Expand Down
4 changes: 2 additions & 2 deletions charts/installer/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# installer

Quickly install pre-compiled binaries from Github releases.
![Version: 0.1.8](https://img.shields.io/badge/Version-0.1.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.9](https://img.shields.io/badge/AppVersion-0.2.9-informational?style=flat-square)

![Version: 0.1.6](https://img.shields.io/badge/Version-0.1.6-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.9](https://img.shields.io/badge/AppVersion-0.2.9-informational?style=flat-square)
Quickly install pre-compiled binaries from Github releases.

## TL;DR
```console
Expand Down
8 changes: 7 additions & 1 deletion charts/installer/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,22 @@ helm install {{ template "chart.name" . }} {{ template "helm.path" . }} -f value
```
{{- end -}}

{{- define "todo" -}}
## Todo
- [ ] Incorporate Docker secret.
{{- end -}}

{{- define "author" -}}
## Author
This project was started in 2020 by Nicholas Wilde.
{{- end -}}

{{ template "chart.header" . }}
{{ template "chart.description" . }}

{{ template "chart.versionBadge" . }}{{ template "chart.typeBadge" . }}{{ template "chart.appVersionBadge" . }}

{{ template "chart.description" . }}

{{ template "chart.requirementsSection" . }}

{{ template "chart.kubeVersionLine" . }}
Expand Down
2 changes: 1 addition & 1 deletion charts/installer/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{{- if .Values.ingress.enabled }}
{{- range $host := .Values.ingress.hosts }}
{{- range .paths }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ . }}
http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }}
{{- end }}
{{- end }}
{{- else if contains "NodePort" .Values.service.type }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{{- if .Values.ingress.enabled -}}
{{- if not (.Capabilities.APIVersions.Has "networking.k8s.io/v1") }}
{{- $fullName := include "installer.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
{{- if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1beta1" -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
Expand Down Expand Up @@ -32,10 +33,11 @@ spec:
http:
paths:
{{- range .paths }}
- path: {{ . }}
- path: {{ .path }}
backend:
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
43 changes: 43 additions & 0 deletions charts/installer/templates/ingress-released.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{{- if .Values.ingress.enabled -}}
{{- if .Capabilities.APIVersions.Has "networking.k8s.io/v1" }}
{{- $fullName := include "installer.fullname" . -}}
{{- $svcPort := .Values.service.port -}}
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "installer.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
pathType: {{ .pathType }}
backend:
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions charts/installer/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if .Values.secret.enabled -}}
{{- if .Values.secret -}}
---
apiVersion: v1
kind: Secret
Expand All @@ -10,4 +10,4 @@ type: Opaque
data:
USER: {{ .Values.secret.user | b64enc | quote }}
GH_TOKEN: {{ .Values.secret.gh_token | b64enc | quote }}
{{- end }}
{{- end }}
51 changes: 27 additions & 24 deletions charts/installer/values.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
# Default values for installer.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
Expand All @@ -6,11 +7,8 @@ replicaCount: 1

image:
repository: nicholaswilde/installer
pullPolicy: Always

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
pullPolicy: IfNotPresent
tag: "0.2.9"

serviceAccount:
# Specifies whether a service account should be created
Expand All @@ -21,17 +19,16 @@ serviceAccount:
# If not set and create is true, a name is generated using the fullname template
name: ""

secret:
enabled: false
user: ""
gh_token: ""
secret: {}
# user: ""
# gh_token: ""

podAnnotations:
# https://crazymax.dev/diun/providers/kubernetes/#kubernetes-annotations
# Set to true to enable image analysis of this pod
diun.enable: "true"
diun.enable: "false"
# Watch all tags of this pod image
diun.watch_repo: "true"
diun.watch_repo: "false"
## Registry options name to use
# regopt: ""
## Maximum number of tags to watch if diun.watch_repo enabled. 0 means all of them
Expand All @@ -43,17 +40,6 @@ podAnnotations:
## useful if you enable diun.watch_repo
# exclude_tags: ""

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

service:
type: ClusterIP
port: 3000
Expand All @@ -64,8 +50,10 @@ ingress:
annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: 192.168.1.0/24
hosts:
- host: installer.192.168.1.193.nip.io
paths: [/]
- host: "installer.192.168.1.193.nip.io"
paths:
- path: "/"
pathType: Prefix
# tls: []
# - secretName: chart-example-tls
# hosts:
Expand All @@ -90,6 +78,21 @@ autoscaling:
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

podSecurityContext: {}
# fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

nodeSelector: {}

tolerations: []
Expand Down

0 comments on commit 5b47269

Please sign in to comment.