diff --git a/deploy/other/a/README.md b/deploy/other/a/README.md new file mode 100644 index 0000000..e967e4b --- /dev/null +++ b/deploy/other/a/README.md @@ -0,0 +1,6 @@ +# Создание секрета для приватного репозитория образов +kubectl create secret docker-registry a-secret-docker-registry \ + --docker-email=slaventius@mail.ru \ + --docker-username=vtievsky \ + --docker-password={Access Tokens} \ + --docker-server=https://git.applicatura.com:5050/obi/auth_service diff --git a/deploy/other/a/a-config.yaml b/deploy/other/a/a-config.yaml new file mode 100644 index 0000000..faee0f5 --- /dev/null +++ b/deploy/other/a/a-config.yaml @@ -0,0 +1,31 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: a-config +data: + APP_ENV: local + ARANGO_DBNAME: obi + ARANGO_HOST: 51.250.23.218 + ARANGO_PASSWORD: :enrj+Cnhfiysq+Gfhjkm! + ARANGO_PORT: "8530" + ARANGO_USER: root + CODELEN: "4" + CODELIFETIME: "15" + CTEXPIREDTIMEOUT: "5" + FILE_SECRET: "12334566" + HASHSECRET: b25seWZvcm9iaXVzZXJz + PORTGRPCCLIENT: "8889" + PORTGRPCSERVER: "8890" + PORTRESTSERVER: "8888" + POSTGRE_DBNAME: postgres + POSTGRE_HOST: 51.250.23.218 + POSTGRE_PASSWORD: :enrj+Cnhfiysq+Gfhjkm! + POSTGRE_PORT: "5432" + POSTGRE_USER: postgres + REGEXP: '""' + SECRET: T7vnDGlNwjc7pxY5agvksbj0adpKYfnbsbvqsnozA6YZWzohhJO1Dl95HTgMt1cN + SENTRY_DEBUG: "false" + SENTRY_DSN: https://75ba967920a2411a879a129217b74080@sentry.applicatura.com/1 + SENTRY_MAX_ERROR_DEPTH: "9" + SENTRY_SERVER_NAME: MOBILE-AUTH V1 + UTEXPIREDTIMEOUT: "1" diff --git a/deploy/other/a/a-deployment.yaml b/deploy/other/a/a-deployment.yaml new file mode 100644 index 0000000..39e000e --- /dev/null +++ b/deploy/other/a/a-deployment.yaml @@ -0,0 +1,26 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: a-deployment + labels: + app: a-application +spec: + replicas: 1 + selector: + matchLabels: + project: a-application + template: + metadata: + labels: + project: a-application + spec: + imagePullSecrets: + - name: a-secret-docker-registry + containers: + - name: a-application + image: git.applicatura.com:5050/obi/auth_service:latest + ports: + - containerPort: 8888 + envFrom: + - configMapRef: + name: a-config diff --git a/deploy/other/ingress.yaml b/deploy/other/ingress.yaml new file mode 100644 index 0000000..a8215f2 --- /dev/null +++ b/deploy/other/ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: ingress + labels: + app: auth-application +spec: +# defaultBackend: +# service: +# name: auth-service +# port: +# number: 9994 + rules: + - http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: auth-service + port: + number: 9994 diff --git a/deploy/other/pv.yaml b/deploy/other/pv.yaml new file mode 100644 index 0000000..f1cc3eb --- /dev/null +++ b/deploy/other/pv.yaml @@ -0,0 +1,22 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: auth-pv +spec: + capacity: + storage: 1Gi + volumeMode: Filesystem + accessModes: + - ReadWriteOnce + persistentVolumeReclaimPolicy: Retain + storageClassName: auth-sc + local: + path: /mnt/auth-storage + nodeAffinity: + required: + nodeSelectorTerms: + - matchExpressions: + - key: kubernetes.io/hostname + operator: In + values: + - kub-node-1 diff --git a/deploy/other/pvc.yaml b/deploy/other/pvc.yaml new file mode 100644 index 0000000..04fe9bd --- /dev/null +++ b/deploy/other/pvc.yaml @@ -0,0 +1,11 @@ +kind: PersistentVolumeClaim +apiVersion: v1 +metadata: + name: auth-pvc +spec: + accessModes: + - ReadWriteOnce + volumeMode: Filesystem + resources: + requests: + storage: 1Gi diff --git a/deploy/other/sc.yaml b/deploy/other/sc.yaml new file mode 100644 index 0000000..48a23cc --- /dev/null +++ b/deploy/other/sc.yaml @@ -0,0 +1,6 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1 +metadata: + name: auth-sc +provisioner: kubernetes.io/no-provisioner +volumeBindingMode: WaitForFirstConsumer diff --git a/deploy/other/test.sh b/deploy/other/test.sh new file mode 100755 index 0000000..0853d8a --- /dev/null +++ b/deploy/other/test.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +if [ -z "$1" ] + then + echo "No argument uid (1 of 3)" + exit 1 +fi + +if [ -z "$2" ] + then + echo "No argument email (2 of 3)" + exit 1 +fi + +if [ -z "$3" ] + then + echo "No argument password (3 of 3)" + exit 1 +fi + +curl --location --request POST 'http://192.168.49.2/api/v1/registration' \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode uid=""$1"" \ + --data-urlencode email=""$2"" \ + --data-urlencode password=""$3"" +echo ""