Updated k8s (#1216)

This commit is contained in:
RGanor 2022-06-07 16:22:38 +03:00 committed by GitHub
parent bcc8441779
commit 88c0aaea27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 20 additions and 107 deletions

View File

@ -1 +1 @@
#Files to deploy pdns-admin on kubernetes
#Files to deploy PowerDNS-Admin on kubernetes

View File

@ -1,22 +1,8 @@
apiVersion: v1
kind: ConfigMap
apiVersion: v1
metadata:
name: powerdnsadmin-env
namespace: powerdnsadmin
data:
FLASK_APP: "/powerdns-admin/app/__init__.py"
BIND_ADDRESS: changeme_0.0.0.0
LDAP_FILTER: changeme_(objectClass=user)
LDAP_PASSWORD: changeme_Password
LDAP_SEARCH_BASE: changeme_cn=Users,dc=domain,dc=com
LDAP_TYPE: changeme_ldap
LDAP_URI: changeme_ldaps://ad.domain.com:636
LDAP_USERNAME: changeme_cn=svcUser,ou=ScriptUsers,dc=domain,dc=com
LDAP_USERNAMEFIELD: changeme_sAMAccountName
PDNS_API_KEY: changeme_secret
PDNS_HOST: changeme_pdns_host
FLASK_APP: powerdnsadmin/__init__.py
SECRET_KEY: changeme_secret
SQLA_DB_HOST: changeme_db_host
SQLA_DB_NAME: changeme_db_name
SQLA_DB_PASSWORD: changeme_db_password_
SQLA_DB_USER: changeme_db_user
SQLALCHEMY_DATABASE_URI: 'mysql://user:password@host/database'

View File

@ -1,102 +1,29 @@
apiVersion: extensions/v1beta1
kind: Deployment
apiVersion: apps/v1
metadata:
name: powerdnsadmin
namespace: powerdnsadmin
labels:
app: powerdnsadmin
spec:
strategy:
type: RollingUpdate
replicas: 1
selector:
matchLabels:
app: powerdnsadmin
template:
metadata:
labels:
app: powerdnsadmin
spec:
containers:
- name: powerdnsadmin
image: changeme_artsn00p/powerdns-admin-docker
ports:
- containerPort: 80
env:
- name: BIND_ADDRESS
valueFrom:
configMapKeyRef:
key: BIND_ADDRESS
name: powerdnsadmin-env
- name: LDAP_FILTER
valueFrom:
configMapKeyRef:
key: LDAP_FILTER
name: powerdnsadmin-env
- name: LDAP_PASSWORD
valueFrom:
configMapKeyRef:
key: LDAP_PASSWORD
name: powerdnsadmin-env
- name: LDAP_SEARCH_BASE
valueFrom:
configMapKeyRef:
key: LDAP_SEARCH_BASE
name: powerdnsadmin-env
- name: LDAP_TYPE
valueFrom:
configMapKeyRef:
key: LDAP_TYPE
name: powerdnsadmin-env
- name: LDAP_URI
valueFrom:
configMapKeyRef:
key: LDAP_URI
name: powerdnsadmin-env
- name: LDAP_USERNAME
valueFrom:
configMapKeyRef:
key: LDAP_USERNAME
name: powerdnsadmin-env
- name: LDAP_USERNAMEFIELD
valueFrom:
configMapKeyRef:
key: LDAP_USERNAMEFIELD
name: powerdnsadmin-env
- name: PDNS_API_KEY
valueFrom:
configMapKeyRef:
key: PDNS_API_KEY
name: powerdnsadmin-env
- name: PDNS_HOST
valueFrom:
configMapKeyRef:
key: PDNS_HOST
name: powerdnsadmin-env
- name: SECRET_KEY
valueFrom:
configMapKeyRef:
key: SECRET_KEY
name: powerdnsadmin-env
- name: PDA_DB_HOST
valueFrom:
configMapKeyRef:
key: SQLA_DB_HOST
name: powerdnsadmin-env
- name: PDA_DB_NAME
valueFrom:
configMapKeyRef:
key: SQLA_DB_NAME
name: powerdnsadmin-env
- name: PDA_DB_PASSWORD
valueFrom:
configMapKeyRef:
key: SQLA_DB_PASSWORD
name: powerdnsadmin-env
- name: PDA_DB_USER
valueFrom:
configMapKeyRef:
key: SQLA_DB_USER
name: powerdnsadmin-env
- name: FLASK_APP
valueFrom:
configMapKeyRef:
key: FLASK_APP
name: powerdnsadmin-env
restartPolicy: Always
- name: powerdnsadmin
image: ngoduykhanh/powerdns-admin
ports:
- containerPort: 80
protocol: TCP
envFrom:
- configMapRef:
name: powerdnsadmin-env
imagePullPolicy: Always
restartPolicy: Always