From 33f9045649d59a9eaa1991d08827a50f391aa14b Mon Sep 17 00:00:00 2001 From: xxxvik-xakerxxx Date: Wed, 25 Oct 2023 12:42:16 +0000 Subject: [PATCH] :bug: test cd --- .github/workflows/main.yml | 16 ++++++ .github/workflows/tag.yaml | 16 ++++++ .helm/values.yaml | 110 +++++++++++++++++++++++++++++++++++++ 3 files changed, 142 insertions(+) create mode 100644 .helm/values.yaml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 15a4c41..03c481f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -31,3 +31,19 @@ jobs: run: | . $(werf ci-env github --as-file) werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_SHA + + deploy: + name: Deploy + needs: converge + runs-on: ubuntu-latest + steps: + - name: Helm + uses: azure/setup-helm@v1 + with: + version: v3 + - name: ConfigCreate + run: | + mkdir ~/.kube/ + echo "${{ secrets.KUBERCONFIG }}" | base64 -d > config + mv config ~/.kube/ + helm upgrade -i --kubeconfig ~/.kube/config "webclient" ".helm" --set global.IngressDomain=staging.rarime.com --set "image.repository=ghcr.io/${GITHUB_REPOSITORY}" --set "image.tag=${GITHUB_SHA}" --create-namespace --namespace rarime-landing-stage-rarime \ No newline at end of file diff --git a/.github/workflows/tag.yaml b/.github/workflows/tag.yaml index 9d00aec..ec9d85f 100644 --- a/.github/workflows/tag.yaml +++ b/.github/workflows/tag.yaml @@ -31,3 +31,19 @@ jobs: run: | . $(werf ci-env github --as-file) werf export web --tag ghcr.io/$GITHUB_REPOSITORY:$GITHUB_REF_NAME + + deploy: + name: Deploy + needs: converge + runs-on: ubuntu-latest + steps: + - name: Helm + uses: azure/setup-helm@v1 + with: + version: v3 + - name: ConfigCreate + run: | + mkdir ~/.kube/ + echo "${{ secrets.KUBERCONFIG }}" | base64 -d > config + mv config ~/.kube/ + helm upgrade -i --kubeconfig ~/.kube/config "webclient" ".helm" --set global.IngressDomain=rarime.com --set "image.repository=ghcr.io/${GITHUB_REPOSITORY}" --set "image.tag=${GITHUB_REF_NAME}" --create-namespace --namespace rarime-landing-prod-rarime diff --git a/.helm/values.yaml b/.helm/values.yaml new file mode 100644 index 0000000..595eaee --- /dev/null +++ b/.helm/values.yaml @@ -0,0 +1,110 @@ +# Default values for template. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +global: + IngressDomain: "" + +image: + repository: "" + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: + - name: "registry.gitlab.com" +nameOverride: "" +fullnameOverride: "" + +imagePullSecret: {} + +config: + create: false + name: env.js + mountPath: "/usr/share/nginx/html/static/env.js" + data: + NODE_ENV: "default" + HORIZON_SERVER: "" + KEY_SERVER_ADMIN: "" + FILE_STORAGE: "" + WEB_CLIENT_URL: "" + APP_NAME: "" + NETWORK_PASSPHRASE: "" + IOS_MANIFEST_LINK: "" + PLAY_MARKET_LINK: "" + IMG_BUCKET_URL: "" + SUPPORT_EMAIL: "" + SUPPORT_PHONE: "" + SUPPORT_URL: "" + BUCKET: "" + VUE_APP_API_URL: "" + +serviceAccount: + # Specifies whether a service account should be created + create: false + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: true + className: "" + annotations: + cert-manager.io/cluster-issuer: letsencrypt + kubernetes.io/ingress.class: nginx + kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: + - hosts: + - storage + secretName: web-tls + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +nodeSelector: {} + +tolerations: [] + +affinity: {}