Skip to content
Snippets Groups Projects
Commit 6751877e authored by Leah Tacke genannt Unterberg's avatar Leah Tacke genannt Unterberg
Browse files

git ci for image building

parent 7ea67895
No related branches found
No related tags found
No related merge requests found
docker-build:
# Use the official docker image.
image: docker:cli
stage: build
services:
- docker:dind
variables:
DOCKER_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
DOCKER_TLS_CERTDIR: ""
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
# All branches are tagged with $DOCKER_IMAGE_NAME (defaults to commit ref slug)
# release branch is also tagged with `latest`
script:
- docker build --pull -t "$DOCKER_IMAGE_NAME" .
- docker push "$DOCKER_IMAGE_NAME"
- |
if [[ "$CI_COMMIT_BRANCH" == "release" ]]; then
docker tag "$DOCKER_IMAGE_NAME" "$CI_REGISTRY_IMAGE:latest"
docker push "$CI_REGISTRY_IMAGE:latest"
fi
rules:
- if: $CI_COMMIT_BRANCH == "release"
exists:
- Dockerfile
......@@ -666,7 +666,7 @@ supersetCeleryFlower:
supersetWebsockets:
# -- This is only required if you intend to use `GLOBAL_ASYNC_QUERIES` in `ws` mode
# see https://github.com/apache/superset/blob/master/CONTRIBUTING.md#async-chart-queries
enabled: false
enabled: true
replicaCount: 1
# -- Sets the [pod disruption budget](https://kubernetes.io/docs/tasks/run-application/configure-pdb/) for supersetWebsockets pods
podDisruptionBudget:
......@@ -944,9 +944,13 @@ redis:
superset-mitm-service:
enabled: true
connections:
origin: '{{ template "superset.fullname" . }}-worker:{{ .Values.service.port }}' # "maed-exporter-frontend-svc.mdata.svc.cluster.local"
mitmDB:
mitm_database_password: "supersaferandommitmdbpasswordwillneverbeguessed"
service:
port: "8180"
......
set windows-shell := ["pwsh", "-c"]
import "kube.just"
_default:
@just --list
up:
docker compose up --build
......
CHART_NAME := "mitm-superset"
CHART_FOLDER := "superset"
helm-package:
cd helm/ && helm package {{CHART_NAME}}
helm-push a: helm-package
# helm registry login registry-1.docker.io -u leahtgu
cd helm/ && helm push {{a}} oci://registry-1.docker.io/leahtgu
helm *args:
helm --kube-context c4c -n mdata {{args}}
helm-install:
helm --kube-context c4c -n mdata install {{CHART_NAME}} helm/{{CHART_FOLDER}}
helm-install-dry:
helm --kube-context c4c -n mdata install {{CHART_NAME}} helm/{{CHART_FOLDER}} --dry-run > dryrun.yaml
helm-uninstall:
helm --kube-context c4c -n mdata uninstall {{CHART_NAME}}
kube-forward:
#! powershell
$POD_NAME = kubectl --context=c4c get pods --namespace mdata -l "app.kubernetes.io/name={{CHART_NAME}},app.kubernetes.io/instance={{CHART_NAME}}" -o jsonpath="{.items[0].metadata.name}"
$CONTAINER_PORT = kubectl --context=c4c get pod --namespace mdata $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}"
Write-Output "Visit http://127.0.0.1:8080 to use your application"
kubectl --context=c4c --namespace mdata port-forward $POD_NAME 8080:$CONTAINER_PORT
kube *arg:
kubectl --context=c4c -n mdata {{arg}}
kubeinto svc="{{CHART_NAME}}" inst="{{CHART_NAME}}":
#! powershell
$POD_NAME = kubectl --context=c4c get pods --namespace mdata -l "app.kubernetes.io/name={{svc}},app.kubernetes.io/instance={{inst}}" -o jsonpath="{.items[0].metadata.name}"
kubectl --context=c4c --namespace mdata exec --stdin --tty $POD_NAME -- /bin/bash
kubelogs svc="{{CHART_NAME}}":
#! powershell
$POD_NAME = kubectl --context=c4c get pods --namespace mdata -l "app.kubernetes.io/name={{svc}},app.kubernetes.io/instance={{CHART_NAME}}" -o jsonpath="{.items[0].metadata.name}"
kubectl --context=c4c --namespace mdata logs $POD_NAME
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment