Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/powfaucet/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ home: https://github.com/pk910/PoWFaucet
sources:
- https://github.com/pk910/PoWFaucet
type: application
version: 1.1.0
version: 1.2.0
appVersion: "2.5.0"
maintainers:
- name: pk910
Expand Down
3 changes: 2 additions & 1 deletion charts/powfaucet/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

# powfaucet

![Version: 1.1.0](https://img.shields.io/badge/Version-1.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)
![Version: 1.2.0](https://img.shields.io/badge/Version-1.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square)

PoW Faucet for EVM chains

Expand Down Expand Up @@ -117,6 +117,7 @@ faucetPowRewardPerHash: 500000000000000000 # 0.5 ETH
| image.repository | string | `"pk910/powfaucet"` | powfaucet container image repository |
| image.tag | string | `"v2-stable"` | powfaucet container image tag |
| ingress.annotations | object | `{}` | Annotations for Ingress |
| ingress.basicAuth | string | `""` | htpasswd entry gating the ingress with basic auth, e.g. "user:{PLAIN}password" or a hashed line from `htpasswd -nbB`. Set it and the chart creates the secret and the nginx annotations; leave it empty to serve the faucet unauthenticated. |
| ingress.enabled | bool | `false` | Ingress resource for the HTTP API |
| ingress.hosts[0].host | string | `"chart-example.local"` | |
| ingress.hosts[0].paths | list | `[]` | |
Expand Down
11 changes: 11 additions & 0 deletions charts/powfaucet/templates/basic-auth-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{- if and .Values.ingress.enabled .Values.ingress.basicAuth }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "powfaucet.fullname" . }}-basic-auth
labels:
{{- include "powfaucet.labels" . | nindent 4 }}
type: Opaque
stringData:
auth: {{ .Values.ingress.basicAuth | quote }}
{{- end }}
6 changes: 6 additions & 0 deletions charts/powfaucet/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if .Values.ingress.basicAuth }}
{{- $annotations := default dict .Values.ingress.annotations }}
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/auth-type" "basic" }}
{{- $_ := set $annotations "nginx.ingress.kubernetes.io/auth-secret" (printf "%s-basic-auth" $fullName) }}
{{- $_ := set .Values.ingress "annotations" $annotations }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
Expand Down
4 changes: 4 additions & 0 deletions charts/powfaucet/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ ingress:
paths: []
# -- Ingress TLS
tls: []
# -- htpasswd entry gating the ingress with basic auth, e.g. "user:{PLAIN}password"
# or a hashed line from `htpasswd -nbB`. Set it and the chart creates the secret and
# the nginx annotations; leave it empty to serve the faucet unauthenticated.
basicAuth: ""
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
Expand Down