Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
mitm-superset
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Machine Data
mitm-superset
Commits
6751877e
Commit
6751877e
authored
3 months ago
by
Leah Tacke genannt Unterberg
Browse files
Options
Downloads
Patches
Plain Diff
git ci for image building
parent
7ea67895
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
.gitlab/.gitlab-ci.yml
+26
-0
26 additions, 0 deletions
.gitlab/.gitlab-ci.yml
helm/superset/values.yaml
+5
-1
5 additions, 1 deletion
helm/superset/values.yaml
justfile
+5
-0
5 additions, 0 deletions
justfile
kube.just
+41
-0
41 additions, 0 deletions
kube.just
with
77 additions
and
1 deletion
.gitlab/.gitlab-ci.yml
0 → 100644
+
26
−
0
View file @
6751877e
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
This diff is collapsed.
Click to expand it.
helm/superset/values.yaml
+
5
−
1
View file @
6751877e
...
...
@@ -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
:
fals
e
enabled
:
tru
e
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"
...
...
This diff is collapsed.
Click to expand it.
justfile
+
5
−
0
View file @
6751877e
set windows-shell := ["pwsh", "-c"]
import "kube.just"
_default:
@just --list
up:
docker compose up --build
...
...
This diff is collapsed.
Click to expand it.
kube.just
0 → 100644
+
41
−
0
View file @
6751877e
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment