apiVersion: v1
kind: Secret
metadata:
name: survey-postgres
namespace: <release-namespace>
annotations:
"helm.sh/resource-policy": keep
type: Opaque
data:
postgresql-password: <random-str-in-base64>
postgresql-postgres-password: <random-str-in-base64>
|
kubectl -n $NS create secret generic survey-postgres --from-literal=postgresql-password=$PSQL_PSWD --from-literal=postgresql-postgres-password=$PSQL_PSWD
postgresql-postgres-password
secret keypostgresql-password
secret key; username survey
apiVersion: v1
kind: Secret
metadata:
name: survey-secrets
namespace: <release-namespace>
annotations:
"helm.sh/resource-policy": keep
type: Opaque
data:
cookie-salt: <random-str-in-base64>
secret-key: <random-str-in-base64>
|
python3 -c "import secrets; print(secrets.token_urlsafe())" | base64
ORpip install django && python -c 'from django.core.management.utils import get_random_secret_key; print(get_random_secret_key())' | base64
survey-secrets
key cookie-salt
python3 -c "import secrets; print(secrets.token_urlsafe()[0:10])" | base64
ORpython -c 'import uuid; print(uuid.uuid4().hex[0:10])' | base64
kind: ConfigMap
apiVersion: v1
metadata:
name: prozorro-<env>-auction-survey-id-config
namespace: prozorro-<env>
labels:
app.kubernetes.io/component: survey-id-config
annotations:
app: auction-survey-id-config
data:
survey_id: dummy-id
|
kubectl exec -it prozorro-<env>-survey-api-<...> -c prozorro-<env>-survey-api -- bash
DJANGO_SUPERUSER_PASSWORD=<STRONG_PASSWORD> DJANGO_SUPERUSER_USERNAME=superuser_ss_<env> DJANGO_SUPERUSER_EMAIL=superuser@prozorro.sale python manage.py createsuperuser --no-input
kubectl exec -it prozorro-<env>-survey-api-<...> -c prozorro-<env>-survey-api -- bash
python manage.py shell --command="from survey.forms.models import Site; out = Site.objects.create(name='prozorro-auction', is_published=False, reshow_enabled=False); print(out.id)"
survey-id
in prozorro-<env>-auction-survey-id-config
prozorro-<env>-auction-frontend