Skip to content

Commit

Permalink
Merge pull request #9 from containerum/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MargoTuleninova authored Oct 15, 2018
2 parents fea5f2c + ec565a3 commit 4b93dcd
Show file tree
Hide file tree
Showing 105 changed files with 15,828 additions and 424 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@
.idea

build

*.DS_Store
44 changes: 23 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,28 @@ COPY --from=alpine /zoneinfo.zip /
COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/

ENV GIN_MODE=debug \
CH_USER_DB="postgres" \
CH_USER_PG_LOGIN="usermanager" \
CH_USER_PG_PASSWORD="ae9Oodai3aid" \
CH_USER_PG_ADDR="postgres:5432" \
CH_USER_PG_DBNAME="usermanager" \
CH_USER_PG_NOSSL=true \
CH_USER_MIGRATIONS_PATH="migrations" \
CH_USER_MAIL="http" \
CH_USER_MAIL_URL="http://ch-mail-templater:7070/" \
CH_USER_RECAPTCHA="dummy" \
CH_USER_RECAPTCHA_KEY="recaptcha_key" \
CH_USER_OAUTH_CLIENTS="http" \
CH_USER_AUTH_HTTP_ADDR="http://ch-auth:1111/" \
CH_USER_PERMISSIONS="http" \
CH_USER_PERMISSIONS_URL="http://permissions:4242" \
CH_USER_TELEGRAM=false \
CH_USER_TELEGRAM_BOT_ID="" \
CH_USER_TELEGRAM_BOT_TOKEN="" \
CH_USER_TELEGRAM_BOT_CHAT_ID="" \
CH_USER_LISTEN_ADDR=":8111" \
CH_USER_USER_MANAGER="impl"
DB="postgres" \
PG_LOGIN="usermanager" \
PG_PASSWORD="ae9Oodai3aid" \
PG_ADDR="postgres:5432" \
PG_DBNAME="usermanager" \
PG_NOSSL=true \
MIGRATIONS_PATH="migrations" \
MAIL="http" \
MAIL_URL="http://ch-mail-templater:7070/" \
RECAPTCHA="dummy" \
RECAPTCHA_KEY="recaptcha_key" \
OAUTH_CLIENTS="http" \
AUTH_URL="http://ch-auth:1111/" \
PERMISSIONS="http" \
PERMISSIONS_URL="http://permissions:4242" \
TELEGRAM=false \
TELEGRAM_BOT_ID="" \
TELEGRAM_BOT_TOKEN="" \
TELEGRAM_BOT_CHAT_ID="" \
PORT=":8111" \
USER_MANAGER="impl" \
EVENTS="http" \
EVENTS_URL="http://events-api:1667"

ENTRYPOINT ["/user-manager"]
48 changes: 24 additions & 24 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ required = ["git.containerum.net/ch/auth"]

[[constraint]]
name = "github.com/containerum/kube-client"
version = "^0.23.18"
version = "^0.23.32"
42 changes: 21 additions & 21 deletions charts/user-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,49 +32,49 @@ spec:
- name: {{ $key }}
value: {{ $val | quote }}
{{- end }}
{{- if .Values.env.local.CH_USER_PG_ADDR }}
- name: CH_USER_PG_ADDR
value: "{{ .Values.env.local.CH_USER_PG_ADDR }}"
{{- if .Values.env.local.PG_ADDR }}
- name: PG_ADDR
value: "{{ .Values.env.local.PG_ADDR }}"
{{- else }}
- name: CH_USER_PG_ADDR
- name: PG_ADDR
value: "{{ .Release.Name }}-postgresql:5432"
{{- end }}
{{- if .Values.env.local.CH_USER_PERMISSIONS_URL }}
- name: CH_USER_PERMISSIONS_URL
value: "{{ .Values.env.local.CH_USER_PERMISSIONS_URL }}"
{{- if .Values.env.local.PERMISSIONS_URL }}
- name: PERMISSIONS_URL
value: "{{ .Values.env.local.PERMISSIONS_URL }}"
{{- else }}
- name: CH_USER_PERMISSIONS_URL
- name: PERMISSIONS_URL
value: "http://{{ .Release.Name }}-permissions:4242"
{{- end }}
{{- if .Values.env.local.CH_USER_AUTH_HTTP_ADDR }}
- name: CH_USER_AUTH_HTTP_ADDR
value: "{{ .Values.env.local.CH_USER_AUTH_HTTP_ADDR }}"
{{- if .Values.env.local.AUTH_URL }}
- name: AUTH_URL
value: "{{ .Values.env.local.AUTH_URL }}"
{{- else }}
- name: CH_USER_AUTH_HTTP_ADDR
- name: AUTH_URL
value: "http://{{ .Release.Name }}-auth:1111"
{{- end }}
{{- if .Values.env.local.CH_USER_MAIL_URL }}
- name: CH_USER_MAIL_URL
value: "{{ .Values.env.local.CH_USER_MAIL_URL }}"
{{- if .Values.env.local.MAIL_URL }}
- name: MAIL_URL
value: "{{ .Values.env.local.MAIL_URL }}"
{{- else }}
- name: CH_USER_MAIL_URL
- name: MAIL_URL
value: "http://{{ .Release.Name }}-mail:7070"
{{- end }}
{{- if .Values.env.local.CH_USER_PG_PASSWORD }}
- name: CH_USER_PG_PASSWORD
{{- if .Values.env.local.PG_PASSWORD }}
- name: PG_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
key: pg-password
{{- else if .Values.tags.platformdb }}
- name: CH_USER_PG_PASSWORD
- name: PG_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgres-password
{{- end }}
{{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }}
- name: CH_USER_ADMIN_PASSWORD
{{- if .Values.env.local.ADMIN_PASSWORD }}
- name: ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: {{ template "fullname" . }}
Expand Down
10 changes: 5 additions & 5 deletions charts/user-manager/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or .Values.env.local.CH_USER_PG_PASSWORD .Values.env.local.CH_USER_ADMIN_PASSWORD }}
{{- if or .Values.env.local.PG_PASSWORD .Values.env.local.ADMIN_PASSWORD }}
apiVersion: v1
kind: Secret
metadata:
Expand All @@ -10,10 +10,10 @@ metadata:
heritage: {{ .Release.Service }}
type: Opaque
data:
{{- if .Values.env.local.CH_USER_PG_PASSWORD }}
pg-password: {{ .Values.env.local.CH_USER_PG_PASSWORD | b64enc }}
{{- if .Values.env.local.PG_PASSWORD }}
pg-password: {{ .Values.env.local.PG_PASSWORD | b64enc }}
{{- end }}
{{- if .Values.env.local.CH_USER_ADMIN_PASSWORD }}
admin-password: {{ .Values.env.local.CH_USER_ADMIN_PASSWORD | b64enc }}
{{- if .Values.env.local.ADMIN_PASSWORD }}
admin-password: {{ .Values.env.local.ADMIN_PASSWORD | b64enc }}
{{- end }}
{{- end }}
38 changes: 19 additions & 19 deletions charts/user-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,26 +18,26 @@ service:
env:
global:
GIN_MODE: debug
CH_USER_DEBUG: true
CH_USER_TEXTLOG: true
CH_USER_LISTEN_ADDR: ":8111"
CH_USER_PG_LOGIN: "usermanager"
CH_USER_PG_DBNAME: "usermanager"
CH_USER_PG_NOSSL: true
CH_USER_MIGRATIONS_PATH: "migrations"
CH_USER_MAIL: "http"
CH_USER_RECAPTCHA: "dummy"
CH_USER_RECAPTCHA_KEY: "recaptcha_key"
CH_USER_OAUTH_CLIENTS: "http"
CH_USER_PERMISSIONS: "http"
CH_USER_USER_MANAGER: "impl"
DEBUG: true
TEXTLOG: true
PORT: ":8111"
PG_LOGIN: "usermanager"
PG_DBNAME: "usermanager"
PG_NOSSL: true
MIGRATIONS_PATH: "migrations"
MAIL: "http"
RECAPTCHA: "dummy"
RECAPTCHA_KEY: "recaptcha_key"
OAUTH_CLIENTS: "http"
PERMISSIONS: "http"
USER_MANAGER: "impl"
local:
CH_USER_PG_PASSWORD:
CH_USER_PG_ADDR: "postgres-master.postgres.svc:5432"
CH_USER_PERMISSIONS_URL: "http://permissions:4242"
CH_USER_AUTH_HTTP_ADDR: "http://auth:1111"
CH_USER_MAIL_URL: "mail:7070"
CH_USER_ADMIN_PASSWORD:
PG_PASSWORD:
PG_ADDR: "postgres-master.postgres.svc.cluster.local:5432"
PERMISSIONS_URL: "http://permissions:4242"
AUTH_URL: "http://auth:1111"
MAIL_URL: "mail-templater:7070"
ADMIN_PASSWORD:

postgresql:
persistence:
Expand Down
Loading

0 comments on commit 4b93dcd

Please sign in to comment.