Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into stac-22097
Browse files Browse the repository at this point in the history
  • Loading branch information
craffit committed Dec 18, 2024
2 parents af2efee + fc5915c commit 5ff5541
Show file tree
Hide file tree
Showing 17 changed files with 587 additions and 5 deletions.
94 changes: 94 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,33 @@ build_suse-observability-values:
- helm dependencies build stable/suse-observability-values
- mkdir -p stable/suse-observability-values/build; helm package --destination stable/suse-observability-values/build stable/suse-observability-values
stage: build
build_tenantmanagement:
artifacts:
paths:
- stable/tenantmanagement/charts/
- stable/tenantmanagement/build/
before_script:
- helm repo add bitnami https://charts.bitnami.com/bitnami
- helm repo add bitnami-full-archive https://raw.githubusercontent.com/bitnami/charts/archive-full-index/bitnami
- helm repo add bitnami-pre-2022 https://raw.githubusercontent.com/bitnami/charts/eb5f9a9513d987b519f0ecd732e7031241c50328/bitnami
- helm repo add elastic https://helm.elastic.co
- helm repo add opentelemetry https://open-telemetry.github.io/opentelemetry-helm-charts
- helm repo add prometheus https://prometheus-community.github.io/helm-charts
- helm repo add stable https://charts.helm.sh/stable
- helm repo add stackstate https://helm.stackstate.io
- helm repo add stackstate-internal https://helm-internal.stackstate.io
- helm repo add stackstate-test https://helm-test.stackstate.io
- helm repo add victoriametrics https://victoriametrics.github.io/helm-charts
image: ${DOCKER_PROXY_URL}/stackstate/sts-ci-images:stackstate-helm-test-9f869792
rules:
- changes:
- stable/tenantmanagement/**/*
if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- - yq e '.dependencies[] | select (.repository == "file*").repository | sub("^file://","")' stable/tenantmanagement/Chart.yaml | xargs -I % helm dependencies build stable/tenantmanagement/%
- helm dependencies build stable/tenantmanagement
- mkdir -p stable/tenantmanagement/build; helm package --destination stable/tenantmanagement/build stable/tenantmanagement
stage: build
build_tenantprovisioning:
artifacts:
paths:
Expand Down Expand Up @@ -1352,6 +1379,17 @@ check_suse-observability-values_version:
script:
- .gitlab/verify_versions_bumped.sh suse-observability-values
stage: validate
check_tenantmanagement_version:
before_script:
- .gitlab/validate_before_script.sh
image: quay.io/helmpack/chart-testing:v3.10.1
rules:
- changes:
- stable/tenantmanagement/**/*
if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- .gitlab/verify_versions_bumped.sh tenantmanagement
stage: validate
check_tenantprovisioning_version:
before_script:
- .gitlab/validate_before_script.sh
Expand Down Expand Up @@ -2871,6 +2909,33 @@ push_suse-observability_to_internal:
stage: push-charts-to-internal
variables:
CHART: stable/suse-observability
push_tenantmanagement_to_internal:
image: ${DOCKER_PROXY_URL}/stackstate/sts-ci-images:stackstate-devops-fd4b135a
rules:
- if: $UPDATE_STACKGRAPH_VERSION
when: never
- if: $UPDATE_AAD_CHART_VERSION
when: never
- if: $UPDATE_STACKSTATE_DOCKER_VERSION
when: never
- if: $UPDATE_STACKPACKS_DOCKER_VERSION
when: never
- changes:
- stable/tenantmanagement/**/*
if: $CI_COMMIT_BRANCH == "master" && $CI_COMMIT_AUTHOR == "stackstate-system-user <ops@stackstate.com>" && $CI_COMMIT_MESSAGE =~ /\[publish-tenantmanagement]/
when: on_success
- changes:
- stable/tenantmanagement/**/*
if: $CI_COMMIT_BRANCH == "master"
when: on_success
- if: $CI_COMMIT_TAG =~ /^tenantmanagement\/.*/
when: on_success
script:
- helm dependencies update ${CHART}
- helm cm-push --username ${CHARTMUSEUM_INTERNAL_USERNAME} --password ${CHARTMUSEUM_INTERNAL_PASSWORD} ${CHART} ${CHARTMUSEUM_INTERNAL_URL}
stage: push-charts-to-internal
variables:
CHART: stable/tenantmanagement
push_tenantprovisioning_to_internal:
image: ${DOCKER_PROXY_URL}/stackstate/sts-ci-images:stackstate-devops-fd4b135a
rules:
Expand Down Expand Up @@ -3476,6 +3541,19 @@ test_suse-observability-values:
stage: test
variables:
CGO_ENABLED: 0
test_tenantmanagement:
image: ${DOCKER_PROXY_URL}/stackstate/sts-ci-images:stackstate-helm-test-9f869792
rules:
- changes:
- stable/tenantmanagement/**/*
exists:
- stable/tenantmanagement/test/*.go
if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- go test ./stable/tenantmanagement/test/...
stage: test
variables:
CGO_ENABLED: 0
test_tenantprovisioning:
image: ${DOCKER_PROXY_URL}/stackstate/sts-ci-images:stackstate-helm-test-9f869792
rules:
Expand Down Expand Up @@ -4149,6 +4227,22 @@ validate_suse-observability-values:
- if [ -f stable/suse-observability-values/ci/default-values.yaml ]; then helm lint stable/suse-observability-values --values stable/suse-observability-values/ci/default-values.yaml; fi
- .gitlab/validate_kubeconform.sh
stage: validate
validate_tenantmanagement:
before_script:
- .gitlab/validate_before_script.sh
image: quay.io/helmpack/chart-testing:v3.10.1
rules:
- changes:
- stable/tenantmanagement/**/*
if: $CI_PIPELINE_SOURCE == "merge_request_event"
script:
- yamale --schema /etc/ct/chart_schema.yaml stable/tenantmanagement/Chart.yaml
- yamllint --config-file /etc/ct/lintconf.yaml stable/tenantmanagement/Chart.yaml
- yamllint --config-file /etc/ct/lintconf.yaml stable/tenantmanagement/values.yaml
- if [ -f stable/tenantmanagement/ci/default-values.yaml ]; then yamllint --config-file /etc/ct/lintconf.yaml stable/tenantmanagement/ci/default-values.yaml; fi
- if [ -f stable/tenantmanagement/ci/default-values.yaml ]; then helm lint stable/tenantmanagement --values stable/tenantmanagement/ci/default-values.yaml; fi
- .gitlab/validate_kubeconform.sh
stage: validate
validate_tenantprovisioning:
before_script:
- .gitlab/validate_before_script.sh
Expand Down
1 change: 1 addition & 0 deletions .jsonnet-libs/extras/helm_chart_repo/variables.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
'sandbox-operator',
'sock-shop',
'tenantprovisioning',
'tenantmanagement',
],
},
rules: {
Expand Down
4 changes: 2 additions & 2 deletions stable/suse-observability/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
appVersion: "7.0.0-snapshot.20241216150200-master-6a7bfee"
version: 2.2.2-pre.6
appVersion: "7.0.0-snapshot.20241217163521-master-6479eaa"
version: 2.2.2-pre.9
description: Helm chart for SUSE Observability
keywords:
- kubernetes
Expand Down
4 changes: 2 additions & 2 deletions stable/suse-observability/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Helm chart for SUSE Observability

Current chart version is `2.2.2-pre.6`
Current chart version is `2.2.2-pre.9`

**Homepage:** <https://gitlab.com/stackvista/stackstate.git>

Expand Down Expand Up @@ -483,7 +483,7 @@ stackstate/stackstate
| stackstate.components.all.image.pullPolicy | string | `"IfNotPresent"` | The default pullPolicy used for all stateless components of StackState; invividual service `pullPolicy`s can be overriden (see below). |
| stackstate.components.all.image.registry | string | `"quay.io"` | Base container image registry for all StackState containers, except for the wait container and the container-tools container |
| stackstate.components.all.image.repositorySuffix | string | `""` | |
| stackstate.components.all.image.tag | string | `"7.0.0-snapshot.20241216150200-master-6a7bfee"` | The default tag used for all stateless components of StackState; invividual service `tag`s can be overriden (see below). |
| stackstate.components.all.image.tag | string | `"7.0.0-snapshot.20241217163521-master-6479eaa"` | The default tag used for all stateless components of StackState; invividual service `tag`s can be overriden (see below). |
| stackstate.components.all.kafkaEndpoint | string | `""` | **Required if `elasticsearch.enabled` is `false`** Endpoint for shared Kafka broker. |
| stackstate.components.all.metricStore.remoteWritePath | string | `"/api/v1/write"` | Remote write path used to ingest metrics, /api/v1/write is most common |
| stackstate.components.all.metrics.agentAnnotationsEnabled | bool | `true` | Put annotations on each pod to instruct the stackstate agent to scrape the metrics |
Expand Down
2 changes: 1 addition & 1 deletion stable/suse-observability/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ stackstate:
pullPolicy: IfNotPresent
# When changing this value make sure to also update hbase.stackgraph.version to the matching StackGraph version
# stackstate.components.all.image.tag -- The default tag used for all stateless components of StackState; invividual service `tag`s can be overriden (see below).
tag: 7.0.0-snapshot.20241216150200-master-6a7bfee
tag: 7.0.0-snapshot.20241217163521-master-6479eaa
# stackstate.components.all.podAnnotations -- Extra annotations
podAnnotations: {}
metrics:
Expand Down
13 changes: 13 additions & 0 deletions stable/tenantmanagement/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v2
name: tenantmanagement
description: Manages all SaaS tenants
type: application

version: 0.1.1
appVersion: "1.0.0"

home: https://gitlab.com/stackvista/devops/helm-charts.git
icon: https://www.stackstate.com/wp-content/uploads/2019/02/152x152-favicon.png
maintainers:
- name: SUSE Observability Team
email: suse-observability-ops@suse.com
65 changes: 65 additions & 0 deletions stable/tenantmanagement/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# tenantmanagement

![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.0.0](https://img.shields.io/badge/AppVersion-1.0.0-informational?style=flat-square)
Manages all SaaS tenants
**Homepage:** <https://gitlab.com/stackvista/devops/helm-charts.git>
## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| SUSE Observability Team | <suse-observability-ops@suse.com> | |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| app.db.password | string | `""` | |
| app.db.url | string | `""` | |
| app.db.username | string | `""` | |
| app.scaling.api_key | string | `""` | |
| app.scaling.url | string | `""` | |
| app.sqs.billing_queue | string | `""` | |
| app.sqs.provisioning_queue | string | `""` | |
| app.sqs.provisioning_status_queue | string | `""` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"quay.io/stackstate/tenant-management"` | |
| image.tag | string | `"0.1.0-SNAPSHOT-2d9f3ce5"` | |
| ingress.annotations | string | `nil` | |
| ingress.enabled | bool | `false` | Whether to deploy Ingress resource. |
| ingress.host | string | `nil` | HTTP host for the ingress. |
| ingress.tls.enabled | bool | `false` | Whether to enable TLS for ingress. |
| ingress.tls.secretName | string | `nil` | The name of K8s secrets containing SSL certificate for ingress. |
| livenessProbe | object | `{}` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext | object | `{}` | |
| pullSecret.password | string | `""` | |
| pullSecret.username | string | `""` | |
| readinessProbe | object | `{}` | |
| replicaCount | int | `1` | |
| resources.limits.cpu | string | `"250m"` | |
| resources.limits.memory | string | `"256Mi"` | |
| resources.requests.cpu | string | `"100m"` | |
| resources.requests.memory | string | `"256Mi"` | |
| securityContext | object | `{}` | |
| service.port | int | `80` | |
| service.targetPort | int | `8080` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.automount | bool | `true` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |
| volumeMounts | list | `[]` | |
| volumes | list | `[]` | |

## Overview
tenantmanagement manages all SaaS tenants.
12 changes: 12 additions & 0 deletions stable/tenantmanagement/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{ template "chart.header" . }}
{{ template "chart.deprecationWarning" . }}
{{ template "chart.badgesSection" . }}
{{ template "chart.description" . }}
{{ template "chart.homepageLine" . }}
{{ template "chart.maintainersSection" . }}
{{ template "chart.sourcesSection" . }}
{{ template "chart.requirementsSection" . }}
{{ template "chart.valuesSection" . }}

## Overview
tenantmanagement manages all SaaS tenants.
62 changes: 62 additions & 0 deletions stable/tenantmanagement/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "tenantmanagement.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "tenantmanagement.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}

{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "tenantmanagement.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "tenantmanagement.labels" -}}
helm.sh/chart: {{ include "tenantmanagement.chart" . }}
{{ include "tenantmanagement.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "tenantmanagement.selectorLabels" -}}
app.kubernetes.io/name: {{ include "tenantmanagement.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "tenantmanagement.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "tenantmanagement.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
Loading

0 comments on commit 5ff5541

Please sign in to comment.