Remove Vault dependency for deployments

This commit is contained in:
2021-06-14 16:27:19 +02:00
parent 7cfa7a7bf1
commit c6a9c7ab35
8 changed files with 79 additions and 34 deletions

View File

@ -11,6 +11,6 @@ data:
* @param string result of password_hash
*/
return new AdminerLoginPasswordLess(
$password_hash = password_hash(rtrim(file_get_contents('/vault/secrets/sqlitepw')), PASSWORD_DEFAULT)
$password_hash = password_hash(getEnv('sqlitepw'), PASSWORD_DEFAULT)
);
?>

View File

@ -23,14 +23,6 @@ spec:
app: adminer
template:
metadata:
annotations:
vault.hashicorp.com/agent-inject: "true"
vault.hashicorp.com/agent-inject-secret-sqlitepw: "secret/adminer"
vault.hashicorp.com/role: "adminer"
vault.hashicorp.com/agent-inject-template-sqlitepw: |
{{ with secret "secret/adminer" -}}
{{ .Data.data.sqlitepw }}
{{- end }}
labels:
app: adminer
spec:
@ -38,6 +30,9 @@ spec:
containers:
- name: adminer
image: bv11-cr01.bessems.eu/proxy/library/adminer
envFrom:
- secretRef:
name: adminer-secret
ports:
- name: web
containerPort: 8080

View File

@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: adminer-secret
labels:
app: adminer
stringData:
sqlitepw: '<removed>'