Comments (6)
@paddatrapper I have done this in the past to override the init container:
spec:
podExtensions:
initContainers:
- command:
- /bin/sh
- -c
- until pg_isready --dbname="$DB_CONNECTION_CHECK_URL"; do echo waiting for database; sleep 5; done;
image: postgres
name: db-readiness-check
env:
- name: DB_CONNECTION_CHECK_URL
valueFrom:
secretKeyRef:
key: DB_CONNECTION_CHECK_URL
name: 'my-db-secret'
database:
disableReadinessCheck: true
In your case you could reference a secret with the username/password for your DB and change the command to utilize those ENVs. I may have gotten some of the indentation off since I was copying this over from another format inside of a helm chart. Hope this helps...its pretty simple to make a "clone" of the default init container and then modify as you need.
from mattermost-operator.
Adding to that, it would be great if Mattermost interpreted environment variables in the connection string correctly, so that this worked in the mattermost container too.
from mattermost-operator.
Hey @paddatrapper,
I do not think we would like to pass those envs to the Init Containers as they are meant to be specific for Mattermost.
What you can do tho, is to define your own init containers for which you can define your own envs:
apiVersion: installation.mattermost.com/v1beta1
kind: Mattermost
metadata:
name: mm-example-anywhere
spec:
...
podExtensions:
initContainers:
- [YOUR CONTAINER DEFINITION HERE]
from mattermost-operator.
Are those extensions patched in or does it require a full definition of the initContainer?
from mattermost-operator.
They require full definition, you can probably copy the default one and adjust.
from mattermost-operator.
Hmm... It seems this is pointless until mattermost supports interpreting the environment variables within the connection string anyway. Thanks for the guidance!
from mattermost-operator.
Related Issues (20)
- CVEs mitigation
- Mattermost Operator Does Not Support AWS IAM Profile for S3 Bucket Auth
- Inconsistent server behavior with several replicas (k8s) HOT 5
- Gossip traffic service / Istio injection HOT 3
- Operator does not configure port 8443 for calls
- Mattermost on Kubernetes with external MySQL database
- Postgres connection string invalid control character in URL for secret data in base64 HOT 1
- operatorhub.io still has v0.5.0 with max k8s version 1.21 as latest HOT 4
- Cannot set initial admin user with Postgres backend HOT 1
- Docs link to broken mysql-operator in k1.27.3 HOT 2
- ARM64 image is not working HOT 1
- Mattermost operator and cluster role scopes
- Mattermost is working but the cluster is reconciling
- [FEATURE]: Add support for COSI
- Service annotation 'tolerate-unready-endpoints' is deprecated HOT 1
- Postgres password rotated, can no longer connect
- Operator managed installation of mattermost with mysql and minio
- Document deployment with Gitlab
- Allow customizing ingress type and pathType directly in the mattermost spec HOT 9
- ingress.spec.ingressClassName is still not implemented
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mattermost-operator.