final touch
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
apiVersion: secretgenerator.mittwald.de/v1alpha1
|
apiVersion: secretgenerator.mittwald.de/v1alpha1
|
||||||
kind: StringSecret
|
kind: StringSecret
|
||||||
metadata:
|
metadata:
|
||||||
name: memelord-secret-key
|
name: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
fields:
|
fields:
|
||||||
- fieldName: secret-key
|
- fieldName: secret-key
|
||||||
@@ -12,7 +12,7 @@ spec:
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: memelord
|
name: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
@@ -1,191 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: apps/v1
|
|
||||||
kind: StatefulSet
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
labels:
|
|
||||||
app: grafana
|
|
||||||
spec:
|
|
||||||
serviceName: grafana
|
|
||||||
replicas: 1
|
|
||||||
selector:
|
|
||||||
matchLabels:
|
|
||||||
app: grafana
|
|
||||||
template:
|
|
||||||
metadata:
|
|
||||||
labels:
|
|
||||||
app: grafana
|
|
||||||
spec:
|
|
||||||
containers:
|
|
||||||
- name: grafana
|
|
||||||
image: grafana/grafana:latest
|
|
||||||
imagePullPolicy: IfNotPresent
|
|
||||||
ports:
|
|
||||||
- containerPort: 3000
|
|
||||||
name: http
|
|
||||||
env:
|
|
||||||
- name: GF_ANALYTICS_REPORTING_ENABLED
|
|
||||||
value: "false"
|
|
||||||
- name: GF_ANALYTICS_CHECK_FOR_UPDATES
|
|
||||||
value: "false"
|
|
||||||
- name: GF_SERVER_DOMAIN
|
|
||||||
value: grafana-laurivosandi.ee-lte-1.codemowers.io
|
|
||||||
- name: GF_SERVER_ROOT_URL
|
|
||||||
value: "https://%(domain)s/"
|
|
||||||
- name: GF_AUTH_OAUTH_ALLOW_INSECURE_EMAIL_LOOKUP
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_BASIC_ENABLED
|
|
||||||
value: "false"
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_ENABLED
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_NAME
|
|
||||||
value: OAuth
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_ICON
|
|
||||||
value: signin
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_ALLOW_SIGN_UP
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_USE_PKCE
|
|
||||||
value: "true"
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_ROLE_ATTRIBUTE_PATH
|
|
||||||
value: "contains(groups[*], 'github.com:codemowers:admins') && 'Admin' || Viewer"
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_ALLOW_ASSIGN_GRAFANA_ADMIN
|
|
||||||
value: "true"
|
|
||||||
- name: GF_SECURITY_DISABLE_INITIAL_ADMIN_CREATION
|
|
||||||
value: "true"
|
|
||||||
|
|
||||||
- name: GF_DATABASE_TYPE
|
|
||||||
value: sqlite3
|
|
||||||
- name: GF_DATABASE_PATH
|
|
||||||
value: /var/lib/grafana/grafana.db
|
|
||||||
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_SIGNOUT_REDIRECT_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_IDP_URI
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_CLIENT_ID
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_CLIENT_ID
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_SECRET
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_CLIENT_SECRET
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_SCOPES
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_AVAILABLE_SCOPES
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_AUTH_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_IDP_AUTH_URI
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_TOKEN_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_IDP_TOKEN_URI
|
|
||||||
- name: GF_AUTH_GENERIC_OAUTH_API_URL
|
|
||||||
valueFrom:
|
|
||||||
secretKeyRef:
|
|
||||||
name: oidc-client-grafana-laurivosandi-owner-secrets
|
|
||||||
key: OIDC_IDP_USERINFO_URI
|
|
||||||
volumeMounts:
|
|
||||||
- name: grafana-storage
|
|
||||||
mountPath: /var/lib/grafana
|
|
||||||
readinessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/health
|
|
||||||
port: 3000
|
|
||||||
initialDelaySeconds: 10
|
|
||||||
periodSeconds: 10
|
|
||||||
livenessProbe:
|
|
||||||
httpGet:
|
|
||||||
path: /api/health
|
|
||||||
port: 3000
|
|
||||||
initialDelaySeconds: 30
|
|
||||||
periodSeconds: 10
|
|
||||||
volumeClaimTemplates:
|
|
||||||
- metadata:
|
|
||||||
name: grafana-storage
|
|
||||||
spec:
|
|
||||||
accessModes:
|
|
||||||
- ReadWriteOnce
|
|
||||||
storageClassName: sqlite
|
|
||||||
resources:
|
|
||||||
requests:
|
|
||||||
storage: 5Gi
|
|
||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Service
|
|
||||||
metadata:
|
|
||||||
name: grafana
|
|
||||||
labels:
|
|
||||||
app: grafana
|
|
||||||
spec:
|
|
||||||
type: ClusterIP
|
|
||||||
selector:
|
|
||||||
app: grafana
|
|
||||||
ports:
|
|
||||||
- name: http
|
|
||||||
port: 80
|
|
||||||
targetPort: 3000
|
|
||||||
---
|
|
||||||
apiVersion: networking.k8s.io/v1
|
|
||||||
kind: Ingress
|
|
||||||
metadata:
|
|
||||||
name: grafana-laurivosandi
|
|
||||||
annotations:
|
|
||||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
|
||||||
spec:
|
|
||||||
rules:
|
|
||||||
- host: grafana-laurivosandi.ee-lte-1.codemowers.io
|
|
||||||
http:
|
|
||||||
paths:
|
|
||||||
- pathType: Prefix
|
|
||||||
path: "/"
|
|
||||||
backend:
|
|
||||||
service:
|
|
||||||
name: grafana
|
|
||||||
port:
|
|
||||||
number: 80
|
|
||||||
tls:
|
|
||||||
- secretName: grafana-laurivosandi-tls
|
|
||||||
|
|
||||||
---
|
|
||||||
apiVersion: cert-manager.io/v1
|
|
||||||
kind: Certificate
|
|
||||||
metadata:
|
|
||||||
name: grafana-laurivosandi
|
|
||||||
spec:
|
|
||||||
secretName: grafana-laurivosandi-tls
|
|
||||||
dnsNames:
|
|
||||||
- grafana-laurivosandi.ee-lte-1.codemowers.io
|
|
||||||
issuerRef:
|
|
||||||
name: letsencrypt
|
|
||||||
kind: ClusterIssuer
|
|
||||||
---
|
|
||||||
apiVersion: codemowers.cloud/v1beta1
|
|
||||||
kind: OIDCClient
|
|
||||||
metadata:
|
|
||||||
name: grafana-laurivosandi
|
|
||||||
spec:
|
|
||||||
displayName: Granafa laurivosandi
|
|
||||||
uri: https://grafana-laurivosandi.ee-lte-1.codemowers.io/
|
|
||||||
redirectUris:
|
|
||||||
- https://grafana-laurivosandi.ee-lte-1.codemowers.io/login/generic_oauth
|
|
||||||
allowedGroups:
|
|
||||||
- github.com:codemowers:admins
|
|
||||||
grantTypes:
|
|
||||||
- authorization_code
|
|
||||||
- refresh_token
|
|
||||||
responseTypes:
|
|
||||||
- code
|
|
||||||
availableScopes:
|
|
||||||
- openid
|
|
||||||
- profile
|
|
||||||
- groups
|
|
||||||
tokenEndpointAuthMethod: none
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: memelord
|
name: {{ .Release.Name }}
|
||||||
spec:
|
spec:
|
||||||
type: ClusterIP
|
type: ClusterIP
|
||||||
selector:
|
selector:
|
||||||
|
|||||||
Reference in New Issue
Block a user