apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: myingress
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/rewrite-target: /$1
spec:
rules:
- host: apatsev.178.154.235.82.sslip.io
http:
paths:
- backend:
serviceName: dokuwiki
servicePort: 80
path: /dokuwiki(/|$)(.*)
- backend:
serviceName: drupal
servicePort: 80
path: /drupal/(.*)
- backend:
serviceName: ghost
servicePort: 80
path: /ghost/(.*)
- backend:
serviceName: redmine
servicePort: 80
path: /redmine/(.*)
- backend:
serviceName: tomcat
servicePort: 80
path: /tomcat/(.*)
string=$(cat pom.xml | grep developerConnection | sed -e s/\<developerConnection\>scm:git:ssh://g)
echo string
echo $string
developerConnection=$(echo ${string//[[:blank:]]/} | cut -c 3- | sed s/developerConnection//g | head -c-4)
echo developerConnection
developerConnection=$(echo $developerConnection| sed 's/gitlab.tools\//gitlab.tools:/g')
echo developerConnection
build_docker_container:
stage: dockerize
script:
- git checkout master
- git pull
- export TAG_TO_BUILD=$(git describe --abbrev=0 --tags)
- test -z "${TAG_TO_BUILD}" && echo "The TAG_TO_BUILD is empty" && exit 1
- git reset --hard "${TAG_TO_BUILD}"
- docker login -u "$CI_REGISTRY_USER" -p $CI_JOB_TOKEN $CI_REGISTRY
- docker build --pull -t "$CI_REGISTRY_IMAGE/$CI_PROJECT_NAME-$CI_COMMIT_REF_SLUG:${TAG_TO_BUILD}" .
- docker push "$CI_REGISTRY_IMAGE/$CI_PROJECT_NAME-$CI_COMMIT_REF_SLUG:${TAG_TO_BUILD}"
kubectl logs prometheus-operator-858dffb4cf-79wzb -n monitoring
ts=2018-10-12T09:04:34.592045358Z caller=main.go:167 msg="Unhandled error received. Exiting..." err="getting CRD: Alertmanager: customresourcedefinitions.apiextensions.k8s.io \"alertmanagers.monitoring.coreos.com\" is forbidden: User \"system:serviceaccount:monitoring:default\" cannot get resource \"customresourcedefinitions\" in API group \"apiextensions.k8s.io\" at the cluster scope"
kubectl -n monitoring get all -l app=prometheus-operator
NAME READY STATUS RESTARTS AGE
pod/prometheus-operator-858dffb4cf-79wzb 0/1 CrashLoopBackOff 15 54m
NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE
deployment.apps/prometheus-operator 1 1 1 0 54m
NAME DESIRED CURRENT READY AGE
replicaset.apps/prometheus-operator-858dffb4cf 1 1 0 54m
NAME COMPLETIONS DURATION AGE
job.batch/prometheus-operator-create-sm-job 0/1 54m 54m
helm install stable/prometheus --name stable-prometheus --set server.persistentVolume.storageClass=local-storage --set alertmanager.persistentVolume.storageClass=local-storage
kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
stable-prometheus-alertmanager Bound local-pv-aa880f42 49Gi RWO local-storage 9s
stable-prometheus-server Bound local-pv-5bec36e4 49Gi RWO local-storage 9s