Verified Commit dc3eab16 authored by Luna's avatar Luna 🦄
Browse files

autodeploy

parent 64aa1caa
Pipeline #368 failed with stages
in 6 minutes and 3 seconds
stages:
- docker-build
# - apply
- apply
variables:
DOCKER_HOST: tcp://docker:2376
......@@ -43,17 +43,15 @@ docker-build:
exists:
- Dockerfile
# apply:
# stage: apply
# only:
# - main
# image:
# name: bitnami/kubectl:latest
# entrypoint: [""]
# script:
# - kubectl config get-contexts
# - kubectl config use-context sophie/items:items-agent
# - kubectl get pods
# - kubectl apply -f yaml/docker-login.yml
# - kubectl apply -f yaml/items-deployment.yaml
# - kubectl apply -f yaml/postgresql-deployment.yaml
apply:
stage: apply
only:
- main
image:
name: bitnami/kubectl:latest
entrypoint: [""]
script:
- kubectl config get-contexts
- kubectl config use-context sophie/hetrixtools-updown-matrix:latest
- kubectl get pods
- kubectl apply -f kubedeploy.yaml
---
kind: Namespace
apiVersion: v1
metadata:
name: webhooks
labels:
name: webhooks
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: hetrixhook-secret
namespace: webhooks
data:
HOMESERVER: "aHR0cHM6Ly9zaGFyay5wbQ=="
ACCESS_TOKEN: "c3l0X1oybDBaV0Vfb2dpWnVoZVBva1hWcmlvcHhnYlRfMmtkbXFW"
ROOM_ID: "IVR6WmVXUlhkUHFjeU5uakticjpzaGFyay5wbQ=="
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: webhooks
name: hetrixhook-app
labels:
app: hetrixhook
spec:
replicas: 1
selector:
matchLabels:
app: hetrixhook
template:
metadata:
labels:
app: hetrixhook
spec:
containers:
- image: registry.git.catgirl.biz/sophie/hetrixtools-updown-matrix:latest
name: hetrixhook
envFrom:
- secretRef:
name: hetrixhook-secret
ports:
- containerPort: 8000
name: hetrixhook
resources:
limits:
cpu: "100m"
memory: 128Mi
imagePullSecrets:
- name: regcred
---
apiVersion: v1
kind: Service
metadata:
namespace: webhooks
name: hetrixhook-svc
labels:
app: hetrixhook
spec:
ports:
- port: 8000
protocol: TCP
selector:
app: hetrixhook
---
# https://kubernetes.io/docs/concepts/services-networking/ingress/#the-ingress-resource
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: hetrixhook
namespace: webhooks
spec:
rules:
- host: hetrixhook.k8s.kokoro.cloud
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: hetrixhook-svc
port:
number: 8000
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment