-
-
Save burakince/b9e759d52ccf9bf6ec7d6eccd644c9fd to your computer and use it in GitHub Desktop.
Helm basic auth with Kubernetes Ingress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
annotations: | |
nginx.ingress.kubernetes.io/auth-type: basic | |
nginx.ingress.kubernetes.io/auth-secret: my-basic-auth | |
nginx.ingress.kubernetes.io/auth-realm: "Authentication Required - ok" | |
name: my-ingress | |
spec: | |
rules: | |
- host: my-host | |
http: | |
paths: | |
- path: / | |
backend: | |
serviceName: my-service | |
servicePort: http |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
data: | |
{{/* htpasswd is available since helm@3.2.0 */}} | |
auth: {{ (htpasswd .Values.http_auth.user (.Values.http_auth.password | toString)) | b64enc | quote }} | |
kind: Secret | |
metadata: | |
name: my-basic-auth | |
type: Opaque |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment