Skip to content

Commit

Permalink
Add portainer (#848)
Browse files Browse the repository at this point in the history
Co-authored-by: Dustin Kaiser <[email protected]>
  • Loading branch information
mrnicegyu11 and mrnicegyu11 authored Oct 22, 2024
1 parent bf07520 commit b26cc7a
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 1 deletion.
1 change: 1 addition & 0 deletions charts/adminer/values.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ ingress:
namespace: {{ .Release.Namespace }}
cert-manager.io/cluster-issuer: "cert-issuer"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.middlewares: traefik-traefik-basic-auth@kubernetescrd # namespace + middleware name
tls:
- hosts:
- {{ requiredEnv "K8S_MONITORING_FQDN" }}
Expand Down
68 changes: 68 additions & 0 deletions charts/portainer/values.yaml.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Default values for adminer.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

replicaCount: 1

image:
repository: portainer/portainer-ce
pullPolicy: IfNotPresent

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

serviceAccount:
# Annotations to add to the service account
annotations: {}
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: portainer-sa-clusteradmin

podAnnotations: {}
podLabels: {}

podSecurityContext:
{}

securityContext:
{}

service:
type: "ClusterIP"
port: 9000

ingress:
enabled: true
className: ""
annotations:
namespace: {{ .Release.Namespace }}
cert-manager.io/cluster-issuer: "cert-issuer"
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.middlewares: traefik-traefik-basic-auth@kubernetescrd,traefik-portainer-strip-prefix@kubernetescrd # namespace + middleware name
tls:
- hosts:
- {{ requiredEnv "K8S_MONITORING_FQDN" }}
secretName: monitoring-tls
hosts:
- host: {{ requiredEnv "K8S_MONITORING_FQDN" }}
paths:
- path: /portainer
pathType: Prefix
backend:
service:
name: portainer
port:
number: 9000


resources:
limits:
cpu: 2
memory: 1024Mi
requests:
cpu: 0.1
memory: 128Mi

nodeSelector:
ops: "true"
9 changes: 9 additions & 0 deletions charts/traefik/values.insecure.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,15 @@ extraObjects:
spec:
basicAuth:
secret: traefik-authorized-users # https://doc.traefik.io/traefik/middlewares/http/basicauth/#users
- apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: portainer-strip-prefix
namespace: {{.Release.Namespace}}
spec:
stripPrefix:
prefixes:
- /portainer
- apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down
11 changes: 10 additions & 1 deletion charts/traefik/values.secure.yaml.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,19 @@ extraObjects:
kind: Middleware
metadata:
name: traefik-basic-auth
namespace: {{.Release.Namespace}}
spec:
basicAuth:
secret: traefik-authorized-users # https://doc.traefik.io/traefik/middlewares/http/basicauth/#users

- apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
name: portainer-strip-prefix
namespace: {{.Release.Namespace}}
spec:
stripPrefix:
prefixes:
- /portainer
- apiVersion: traefik.io/v1alpha1
kind: Middleware
metadata:
Expand Down

0 comments on commit b26cc7a

Please sign in to comment.