Infra and ingress
This commit is contained in:
parent
5321c4cfba
commit
11adc674c9
3 changed files with 38 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
||||||
variables:
|
variables:
|
||||||
WEBSITE_SRC: ${CI_PROJECT_DIR}/website
|
WEBSITE_SRC: ${CI_PROJECT_DIR}/website
|
||||||
|
INFRA_SRC: ${CI_PROJECT_DIR}/infra
|
||||||
|
|
||||||
IMAGE_PREFIX: registry.gitlab.com/momothereal/momoperes.ca
|
IMAGE_PREFIX: registry.gitlab.com/momothereal/momoperes.ca
|
||||||
WEBSITE_IMAGE: ${IMAGE_PREFIX}/website
|
WEBSITE_IMAGE: ${IMAGE_PREFIX}/website
|
||||||
|
@ -45,3 +46,19 @@ website:deploy:
|
||||||
- master
|
- master
|
||||||
changes:
|
changes:
|
||||||
- website/**/*
|
- website/**/*
|
||||||
|
|
||||||
|
infra:deploy:
|
||||||
|
stage: deploy
|
||||||
|
image: lwolf/helm-kubectl-docker:v1.15.4-v2.14.3
|
||||||
|
script:
|
||||||
|
- mkdir -p ${KUBECONFIG_PARENT}
|
||||||
|
- echo ${K8S_CLUSTER_CONFIG} | base64 -d > ${KUBECONFIG}
|
||||||
|
|
||||||
|
# Deploy manifests directly
|
||||||
|
- cd ${INFRA_SRC}/
|
||||||
|
- kubectl apply --namespace ${DEPLOY_NAMESPACE} -R -f manifests/
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- master
|
||||||
|
changes:
|
||||||
|
- infra/**/*
|
||||||
|
|
17
infra/manifests/ingress.yaml
Normal file
17
infra/manifests/ingress.yaml
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
apiVersion: networking.k8s.io/v1beta1
|
||||||
|
kind: Ingress
|
||||||
|
metadata:
|
||||||
|
name: public-ingress
|
||||||
|
spec:
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- momoperes.ca
|
||||||
|
secretName: momoperes.ca-wildcard-tls
|
||||||
|
rules:
|
||||||
|
- host: momoperes.ca
|
||||||
|
http:
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
backend:
|
||||||
|
serviceName: website
|
||||||
|
servicePort: 9000
|
4
infra/manifests/namespace.yaml
Normal file
4
infra/manifests/namespace.yaml
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: public
|
Loading…
Add table
Add a link
Reference in a new issue