diff --git a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile index 5b0fef1c..716f0640 100644 --- a/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile +++ b/freeleaps/alpha/ci/freeleaps-service-hub/Jenkinsfile @@ -8,9 +8,30 @@ executeFreeleapsPipeline { serviceGitRepo = "https://gitea.freeleaps.mathmast.com/freeleaps/freeleaps-service-hub.git" serviceGitRepoType = 'monorepo' serviceGitCredentialsId = 'freeleaps-ops-git-credentials' - executeMode = 'on-demand' + executeMode = 'fully' commitMessageLintEnabled = false components = [ + [ + name: 'metrics', + root: 'apps/metrics', + language: 'python', + dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', + buildCacheEnabled: true, + buildAgentImage: 'python:3.12-slim', + buildArtifacts: ['.'], + lintEnabled: false, + sastEnabled: false, + imageRegistry: 'docker.io', + imageRepository: 'freeleaps', + imageName: 'metrics', + imageBuilder: 'dind', + dockerfilePath: 'Dockerfile', + imageBuildRoot: '.', + imageReleaseArchitectures: ['linux/amd64', 'linux/arm64/v8'], + registryCredentialsId: 'freeleaps-devops-docker-hub-credentials', + semanticReleaseEnabled: true + ], [ name: 'authentication', root: 'apps/authentication', diff --git a/freeleaps/helm-pkg/authentication/values.alpha.yaml b/freeleaps/helm-pkg/authentication/values.alpha.yaml index e63682bf..e31bc359 100644 --- a/freeleaps/helm-pkg/authentication/values.alpha.yaml +++ b/freeleaps/helm-pkg/authentication/values.alpha.yaml @@ -15,7 +15,7 @@ authentication: registry: docker.io repository: null name: authentication - tag: snapshot-c406f6d + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/authentication/values.prod.yaml b/freeleaps/helm-pkg/authentication/values.prod.yaml index 6dd598ee..be76b182 100644 --- a/freeleaps/helm-pkg/authentication/values.prod.yaml +++ b/freeleaps/helm-pkg/authentication/values.prod.yaml @@ -13,7 +13,7 @@ authentication: registry: docker.io repository: null name: authentication - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/centralStorage/values.alpha.yaml b/freeleaps/helm-pkg/centralStorage/values.alpha.yaml index 6636a925..df325163 100644 --- a/freeleaps/helm-pkg/centralStorage/values.alpha.yaml +++ b/freeleaps/helm-pkg/centralStorage/values.alpha.yaml @@ -15,7 +15,7 @@ centralStorage: registry: docker.io repository: null name: central_storage - tag: snapshot-12a0d9a + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http @@ -90,22 +90,22 @@ centralStorage: kind: FreeleapsSecretStore name: freeleaps-main-secret-store target: - name: "freeleaps-central-storage-secrets" - creationPolicy: "Owner" + name: freeleaps-central-storage-secrets + creationPolicy: Owner refreshInterval: 30s data: - - key: mongodbUri - remoteRef: - key: "freeleaps-alpha-mongodb-uri" - type: Secret - - key: azureStorageDocumentApiKey - remoteRef: - key: "freeleaps-alpha-azure-storage-document-api-key" - type: Secret - - key: azureStorageDocumentApiEndpoint - remoteRef: - key: "freeleaps-alpha-azure-storage-document-api-endpoint" - type: Secret + - key: mongodbUri + remoteRef: + key: freeleaps-alpha-mongodb-uri + type: Secret + - key: azureStorageDocumentApiKey + remoteRef: + key: freeleaps-alpha-azure-storage-document-api-key + type: Secret + - key: azureStorageDocumentApiEndpoint + remoteRef: + key: freeleaps-alpha-azure-storage-document-api-endpoint + type: Secret vpa: minAllowed: enabled: false diff --git a/freeleaps/helm-pkg/centralStorage/values.prod.yaml b/freeleaps/helm-pkg/centralStorage/values.prod.yaml index 11964b10..f16806cc 100644 --- a/freeleaps/helm-pkg/centralStorage/values.prod.yaml +++ b/freeleaps/helm-pkg/centralStorage/values.prod.yaml @@ -18,7 +18,7 @@ centralStorage: registry: docker.io repository: null name: central_storage - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/chat/values.alpha.yaml b/freeleaps/helm-pkg/chat/values.alpha.yaml index 83b6e262..a666cf20 100644 --- a/freeleaps/helm-pkg/chat/values.alpha.yaml +++ b/freeleaps/helm-pkg/chat/values.alpha.yaml @@ -16,7 +16,7 @@ chat: registry: docker.io repository: null name: chat - tag: snapshot-72ca055 + tag: snapshot-1213863 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/content/values.alpha.yaml b/freeleaps/helm-pkg/content/values.alpha.yaml index edfb1b09..2a8a5a03 100644 --- a/freeleaps/helm-pkg/content/values.alpha.yaml +++ b/freeleaps/helm-pkg/content/values.alpha.yaml @@ -15,7 +15,7 @@ content: registry: docker.io repository: null name: content - tag: snapshot-12a0d9a + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http @@ -90,18 +90,18 @@ content: kind: FreeleapsSecretStore name: freeleaps-main-secret-store target: - name: "freeleaps-content-alpha-secrets" - creationPolicy: "Owner" + name: freeleaps-content-alpha-secrets + creationPolicy: Owner refreshInterval: 30s data: - - key: mongodbUri - remoteRef: - key: "freeleaps-alpha-mongodb-uri" - type: Secret - - key: freeleapsWwwAsAzureClientSecret - remoteRef: - key: "freeleaps-alpha-www-as-azure-client-secret" - type: Secret + - key: mongodbUri + remoteRef: + key: freeleaps-alpha-mongodb-uri + type: Secret + - key: freeleapsWwwAsAzureClientSecret + remoteRef: + key: freeleaps-alpha-www-as-azure-client-secret + type: Secret vpa: minAllowed: enabled: false diff --git a/freeleaps/helm-pkg/content/values.prod.yaml b/freeleaps/helm-pkg/content/values.prod.yaml index 96850e33..f520c534 100644 --- a/freeleaps/helm-pkg/content/values.prod.yaml +++ b/freeleaps/helm-pkg/content/values.prod.yaml @@ -13,7 +13,7 @@ content: registry: docker.io repository: null name: content - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/devops/values.alpha.yaml b/freeleaps/helm-pkg/devops/values.alpha.yaml index 0670e183..a6994a8c 100644 --- a/freeleaps/helm-pkg/devops/values.alpha.yaml +++ b/freeleaps/helm-pkg/devops/values.alpha.yaml @@ -10,7 +10,7 @@ devops: registry: docker.io repository: null name: devops - tag: snapshot-45b4ebd + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/devops/values.prod.yaml b/freeleaps/helm-pkg/devops/values.prod.yaml index 9c918915..949df872 100644 --- a/freeleaps/helm-pkg/devops/values.prod.yaml +++ b/freeleaps/helm-pkg/devops/values.prod.yaml @@ -10,7 +10,7 @@ devops: registry: docker.io repository: null name: devops - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/devsvc/values.prod.yaml b/freeleaps/helm-pkg/devsvc/values.prod.yaml index 2d76b3e8..b85aa765 100644 --- a/freeleaps/helm-pkg/devsvc/values.prod.yaml +++ b/freeleaps/helm-pkg/devsvc/values.prod.yaml @@ -18,7 +18,7 @@ devsvc: registry: docker.io repository: null name: devsvc - tag: snapshot-64a4ff7 + tag: 1.3.0 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/freeleaps/values.alpha.yaml b/freeleaps/helm-pkg/freeleaps/values.alpha.yaml index a83e9b89..604a2a82 100644 --- a/freeleaps/helm-pkg/freeleaps/values.alpha.yaml +++ b/freeleaps/helm-pkg/freeleaps/values.alpha.yaml @@ -16,7 +16,7 @@ freeleaps: registry: docker.io repository: null name: backend - tag: snapshot-72ca055 + tag: snapshot-1213863 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/frontend/values.alpha.yaml b/freeleaps/helm-pkg/frontend/values.alpha.yaml index 70f5aa30..c268c87a 100644 --- a/freeleaps/helm-pkg/frontend/values.alpha.yaml +++ b/freeleaps/helm-pkg/frontend/values.alpha.yaml @@ -8,7 +8,7 @@ frontend: registry: docker.io repository: null name: frontend - tag: snapshot-72ca055 + tag: snapshot-1213863 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/helm-pkg/metrics/Chart.yaml b/freeleaps/helm-pkg/metrics/Chart.yaml new file mode 100644 index 00000000..3c66e7ce --- /dev/null +++ b/freeleaps/helm-pkg/metrics/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: metrics +description: A Helm Chart of metrics, which part of Freeleaps Platform, powered by Freeleaps. +type: application +version: 0.0.1 +appVersion: "0.0.1" diff --git a/freeleaps/helm-pkg/metrics/templates/metrics/deployment.yaml b/freeleaps/helm-pkg/metrics/templates/metrics/deployment.yaml new file mode 100644 index 00000000..e81c2178 --- /dev/null +++ b/freeleaps/helm-pkg/metrics/templates/metrics/deployment.yaml @@ -0,0 +1,97 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/name: "metrics" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + name: "metrics" + namespace: {{ .Release.Namespace | quote }} +spec: + selector: + matchLabels: + app.kubernetes.io/name: "metrics" + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/managed-by: {{ .Release.Service }} + replicas: {{ .Values.metrics.replicas }} + template: + metadata: + labels: + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/name: "metrics" + app.kubernetes.io/managed-by: {{ .Release.Service }} + app.kubernetes.io/instance: {{ .Release.Name }} + annotations: + app.kubernetes.io/config-checksum: {{ include (print $.Template.BasePath "/metrics/metrics-config.yaml") . | sha256sum }} + spec: + containers: + - name: "metrics" + image: "{{ coalesce .Values.metrics.image.registry .Values.global.registry "docker.io"}}/{{ coalesce .Values.metrics.image.repository .Values.global.repository }}/{{ .Values.metrics.image.name }}:{{ .Values.metrics.image.tag | default "latest" }}" + imagePullPolicy: {{ .Values.metrics.image.imagePullPolicy | default "IfNotPresent" }} + ports: + {{- range $port := .Values.metrics.ports }} + - containerPort: {{ $port.containerPort }} + name: {{ $port.name }} + protocol: {{ $port.protocol }} + {{- end }} + {{- if .Values.metrics.resources }} + resources: + {{- toYaml .Values.metrics.resources | nindent 12 }} + {{- end }} + {{- if .Values.metrics.probes }} + {{- if and (.Values.metrics.probes.liveness) (eq .Values.metrics.probes.liveness.type "httpGet") }} + livenessProbe: + httpGet: + path: {{ .Values.metrics.probes.liveness.config.path }} + port: {{ .Values.metrics.probes.liveness.config.port }} + {{- if .Values.metrics.probes.liveness.config.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.metrics.probes.liveness.config.initialDelaySeconds }} + {{- end }} + {{- if .Values.metrics.probes.liveness.config.periodSeconds }} + periodSeconds: {{ .Values.metrics.probes.liveness.config.periodSeconds }} + {{- end }} + {{- if .Values.metrics.probes.liveness.config.timeoutSeconds }} + timeoutSeconds: {{ .Values.metrics.probes.liveness.config.timeoutSeconds }} + {{- end }} + {{- if .Values.metrics.probes.liveness.config.successThreshold }} + successThreshold: {{ .Values.metrics.probes.liveness.config.successThreshold }} + {{- end }} + {{- if .Values.metrics.probes.liveness.config.failureThreshold }} + failureThreshold: {{ .Values.metrics.probes.liveness.config.failureThreshold }} + {{- end }} + {{- if .Values.metrics.probes.liveness.config.terminationGracePeriodSeconds }} + terminationGracePeriodSeconds: {{ .Values.metrics.probes.liveness.config.terminationGracePeriodSeconds }} + {{- end }} + {{- end }} + {{- if and (.Values.metrics.probes.readiness) (eq .Values.metrics.probes.readiness.type "httpGet") }} + readinessProbe: + httpGet: + path: {{ .Values.metrics.probes.readiness.config.path }} + port: {{ .Values.metrics.probes.readiness.config.port }} + {{- if .Values.metrics.probes.readiness.config.initialDelaySeconds }} + initialDelaySeconds: {{ .Values.metrics.probes.readiness.config.initialDelaySeconds }} + {{- end }} + {{- if .Values.metrics.probes.readiness.config.periodSeconds }} + periodSeconds: {{ .Values.metrics.probes.readiness.config.periodSeconds }} + {{- end }} + {{- if .Values.metrics.probes.readiness.config.timeoutSeconds }} + timeoutSeconds: {{ .Values.metrics.probes.readiness.config.timeoutSeconds }} + {{- end }} + {{- if .Values.metrics.probes.readiness.config.successThreshold }} + successThreshold: {{ .Values.metrics.probes.readiness.config.successThreshold }} + {{- end }} + {{- if .Values.metrics.probes.readiness.config.failureThreshold }} + failureThreshold: {{ .Values.metrics.probes.readiness.config.failureThreshold }} + {{- end }} + {{- end }} + {{- end}} + env: + {{- range $key, $value := .Values.metrics.configs }} + - name: {{ $key | snakecase | upper }} + valueFrom: + secretKeyRef: + name: metrics-config + key: {{ $key | snakecase | upper }} + {{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/metrics/templates/metrics/metrics-config.yaml b/freeleaps/helm-pkg/metrics/templates/metrics/metrics-config.yaml new file mode 100644 index 00000000..dd43d201 --- /dev/null +++ b/freeleaps/helm-pkg/metrics/templates/metrics/metrics-config.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: Secret +metadata: + name: metrics-config + namespace: {{ .Release.Namespace }} +type: Opaque +data: + STARROCKS_HOST: {{ .Values.metrics.configs.starrocksHost | b64enc | quote }} + STARROCKS_PORT: {{ .Values.metrics.configs.starrocksPort | toString | b64enc | quote }} + STARROCKS_USER: {{ .Values.metrics.configs.starrocksUser | b64enc | quote }} + STARROCKS_PASSWORD: {{ .Values.metrics.configs.starrocksPassword | b64enc | quote }} + STARROCKS_DATABASE: {{ .Values.metrics.configs.starrocksDatabase | b64enc | quote }} + PROMETHEUS_ENDPOINT: {{ .Values.metrics.configs.prometheusEndpoint | b64enc | quote }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/metrics/templates/metrics/service.yaml b/freeleaps/helm-pkg/metrics/templates/metrics/service.yaml new file mode 100644 index 00000000..50b615eb --- /dev/null +++ b/freeleaps/helm-pkg/metrics/templates/metrics/service.yaml @@ -0,0 +1,26 @@ +{{ $namespace := .Release.Namespace }} +{{ $appVersion := .Chart.AppVersion | quote }} +{{ $releaseService := .Release.Service }} +{{ $releaseName := .Release.Name }} +{{- range $service := .Values.metrics.services }} +--- +apiVersion: v1 +kind: Service +metadata: + name: {{ $service.name }} + namespace: {{ $namespace }} + labels: + app.kubernetes.io/version: {{ $appVersion }} + app.kubernetes.io/name: {{ $service.name | quote }} + app.kubernetes.io/managed-by: {{ $releaseService }} + app.kubernetes.io/instance: {{ $releaseName }} +spec: + ports: + - port: {{ $service.port }} + targetPort: {{ $service.targetPort }} + selector: + app.kubernetes.io/version: {{ $appVersion }} + app.kubernetes.io/name: "metrics" + app.kubernetes.io/managed-by: {{ $releaseService }} + app.kubernetes.io/instance: {{ $releaseName }} +{{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/metrics/templates/metrics/vpa.yaml b/freeleaps/helm-pkg/metrics/templates/metrics/vpa.yaml new file mode 100644 index 00000000..bc3efdc3 --- /dev/null +++ b/freeleaps/helm-pkg/metrics/templates/metrics/vpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.metrics.vpa }} +--- +apiVersion: autoscaling.k8s.io/v1 +kind: VerticalPodAutoscaler +metadata: + name: {{ .Release.Name }}-vpa + namespace: {{ .Release.Namespace }} +spec: + targetRef: + apiVersion: apps/v1 + kind: Deployment + name: metrics + resourcePolicy: + containerPolicies: + - containerName: '*' + {{- if .Values.metrics.vpa.minAllowed.enabled }} + minAllowed: + cpu: {{ .Values.metrics.vpa.minAllowed.cpu }} + memory: {{ .Values.metrics.vpa.minAllowed.memory }} + {{- end }} + {{- if .Values.metrics.vpa.maxAllowed.enabled }} + maxAllowed: + cpu: {{ .Values.metrics.vpa.maxAllowed.cpu }} + memory: {{ .Values.metrics.vpa.maxAllowed.memory }} + {{- end }} + {{- if .Values.metrics.vpa.controlledResources }} + controlledResources: + {{- range .Values.metrics.vpa.controlledResources }} + - {{ . }} + {{- end }} + {{- end }} +{{- end }} \ No newline at end of file diff --git a/freeleaps/helm-pkg/metrics/values.alpha.yaml b/freeleaps/helm-pkg/metrics/values.alpha.yaml new file mode 100644 index 00000000..8348b3fc --- /dev/null +++ b/freeleaps/helm-pkg/metrics/values.alpha.yaml @@ -0,0 +1,71 @@ +global: + registry: docker.io + repository: freeleaps + nodeSelector: {} +logIngest: + enabled: false +metrics: + replicas: 1 + image: + registry: docker.io + repository: null + name: metrics + tag: snapshot-38ff0ae + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8009 + protocol: TCP + resources: + requests: + cpu: '0.1' + memory: 64Mi + limits: + cpu: '0.2' + memory: 128Mi + probes: + liveness: + type: httpGet + config: + path: /api/_/livez + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + terminationGracePeriodSeconds: 30 + readiness: + type: httpGet + config: + path: /api/_/readyz + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + services: + - name: metrics-service + type: ClusterIP + port: 8009 + targetPort: 8009 + configs: + starrocksHost: freeleaps-starrocks-cluster-fe-service.freeleaps-data-platform.svc + starrocksPort: 9030 + starrocksUser: freeleaps_dw_admin + starrocksPassword: r7Y@QTb*7BQN@hDGsN + starrocksDatabase: freeleaps + prometheusEndpoint: http://kube-prometheus-stack-prometheus.freeleaps-monitoring-system:9090 + vpa: + minAllowed: + enabled: false + cpu: 100m + memory: 64Mi + maxAllowed: + enabled: true + cpu: 100m + memory: 128Mi + controlledResources: + - cpu + - memory diff --git a/freeleaps/helm-pkg/metrics/values.prod.yaml b/freeleaps/helm-pkg/metrics/values.prod.yaml new file mode 100644 index 00000000..a74e2902 --- /dev/null +++ b/freeleaps/helm-pkg/metrics/values.prod.yaml @@ -0,0 +1,71 @@ +global: + registry: docker.io + repository: freeleaps + nodeSelector: {} +logIngest: + enabled: false +metrics: + replicas: 1 + image: + registry: docker.io + repository: null + name: metrics + tag: snapshot-38ff0ae + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8009 + protocol: TCP + resources: + requests: + cpu: '0.1' + memory: 64Mi + limits: + cpu: '0.2' + memory: 128Mi + probes: + liveness: + type: httpGet + config: + path: /api/_/livez + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + terminationGracePeriodSeconds: 30 + readiness: + type: httpGet + config: + path: /api/_/readyz + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + services: + - name: metrics-service + type: ClusterIP + port: 8009 + targetPort: 8009 + configs: + starrocksHost: freeleaps-starrocks-cluster-fe-service.freeleaps-data-platform.svc + starrocksPort: 9030 + starrocksUser: freeleaps_dw_admin + starrocksPassword: r7Y@QTb*7BQN@hDGsN + starrocksDatabase: freeleaps + prometheusEndpoint: http://kube-prometheus-stack-prometheus.freeleaps-monitoring-system:9090 + vpa: + minAllowed: + enabled: false + cpu: 100m + memory: 64Mi + maxAllowed: + enabled: true + cpu: 100m + memory: 128Mi + controlledResources: + - cpu + - memory diff --git a/freeleaps/helm-pkg/metrics/values.yaml b/freeleaps/helm-pkg/metrics/values.yaml new file mode 100644 index 00000000..c00438b8 --- /dev/null +++ b/freeleaps/helm-pkg/metrics/values.yaml @@ -0,0 +1,71 @@ +global: + registry: docker.io + repository: freeleaps + nodeSelector: {} +logIngest: + enabled: false +metrics: + replicas: 1 + image: + registry: docker.io + repository: null + name: metrics + tag: "1.0.0" + imagePullPolicy: IfNotPresent + ports: + - name: http + containerPort: 8009 + protocol: TCP + resources: + requests: + cpu: '0.1' + memory: 64Mi + limits: + cpu: '0.2' + memory: 128Mi + probes: + liveness: + type: httpGet + config: + path: /api/_/livez + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + terminationGracePeriodSeconds: 30 + readiness: + type: httpGet + config: + path: /api/_/readyz + port: 8009 + initialDelaySeconds: 30 + periodSeconds: 10 + timeoutSeconds: 10 + successThreshold: 1 + failureThreshold: 5 + services: + - name: metrics-service + type: ClusterIP + port: 8009 + targetPort: 8009 + configs: + starrocksHost: "" + starrocksPort: 8009 + starrocksUser: "" + starrocksPassword: "" + starrocksDatabase: "" + prometheusEndpoint: "" + vpa: + minAllowed: + enabled: false + cpu: 100m + memory: 64Mi + maxAllowed: + enabled: true + cpu: 100m + memory: 128Mi + controlledResources: + - cpu + - memory diff --git a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml index 0c04720c..b0fdc90b 100644 --- a/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml +++ b/freeleaps/helm-pkg/notification/templates/notification/notification-config.yaml @@ -10,6 +10,7 @@ data: SERVICE_API_ACCESS_HOST: {{ .Values.notification.configs.serviceApiAccessHost | b64enc | quote }} SERVICE_API_ACCESS_PORT: {{ .Values.notification.configs.serviceApiAccessPort | toString | b64enc }} RABBITMQ_HOST: {{ .Values.notification.configs.rabbitmqHost | b64enc | quote }} + AUTH_SERVICE_ENDPOINT: {{ .Values.notification.configs.authServiceEndpoint | b64enc | quote }} RABBITMQ_PORT: {{ .Values.notification.configs.rabbitmqPort | toString | b64enc }} RABBITMQ_USERNAME: {{ .Values.notification.configs.rabbitmqUsername | b64enc | quote }} RABBITMQ_VRITUAL_HOST: {{ .Values.notification.configs.rabbitmqVritualHost | b64enc | quote }} diff --git a/freeleaps/helm-pkg/notification/values.alpha.yaml b/freeleaps/helm-pkg/notification/values.alpha.yaml index 45feb8c5..d85e677f 100644 --- a/freeleaps/helm-pkg/notification/values.alpha.yaml +++ b/freeleaps/helm-pkg/notification/values.alpha.yaml @@ -15,7 +15,7 @@ notification: registry: docker.io repository: null name: notification - tag: snapshot-3301aec + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http @@ -34,7 +34,7 @@ notification: config: path: /api/_/readyz port: 8003 - initialDelaySeconds: 5 + initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 3 successThreshold: 1 @@ -44,7 +44,7 @@ notification: config: path: /api/_/livez port: 8003 - initialDelaySeconds: 5 + initialDelaySeconds: 30 periodSeconds: 15 timeoutSeconds: 3 successThreshold: 1 @@ -83,6 +83,7 @@ notification: mongodbName: freeleaps2 mongodbPort: 27017 rabbitmqHost: freeleaps-alpha-rabbitmq.freeleaps-alpha.svc.freeleaps.cluster + authServiceEndpoint: http://freeleaps-auth-service.68c0da88a0a7837e84b580eb-alpha.svc.freeleaps.cluster:9000/api/v1/keys/ rabbitmqPort: 5672 rabbitmqUsername: user rabbitmqVritualHost: / diff --git a/freeleaps/helm-pkg/notification/values.prod.yaml b/freeleaps/helm-pkg/notification/values.prod.yaml index d21c4943..f7d39a66 100644 --- a/freeleaps/helm-pkg/notification/values.prod.yaml +++ b/freeleaps/helm-pkg/notification/values.prod.yaml @@ -13,7 +13,7 @@ notification: registry: docker.io repository: null name: notification - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http @@ -32,7 +32,7 @@ notification: config: path: /api/_/readyz port: 8003 - initialDelaySeconds: 5 + initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 3 successThreshold: 1 @@ -42,7 +42,7 @@ notification: config: path: /api/_/livez port: 8003 - initialDelaySeconds: 5 + initialDelaySeconds: 30 periodSeconds: 15 timeoutSeconds: 3 successThreshold: 1 @@ -69,6 +69,7 @@ notification: mongodbName: freeleaps2 mongodbPort: 27017 rabbitmqHost: freeleaps-prod-rabbitmq-headless.freeleaps-prod.svc.freeleaps.cluster + authServiceEndpoint: http://freeleaps-auth-service.68c0da88a0a7837e84b580eb-prod.svc.freeleaps.cluster:9000/api/v1/keys/ rabbitmqPort: 5672 rabbitmqUsername: user rabbitmqVritualHost: / diff --git a/freeleaps/helm-pkg/notification/values.yaml b/freeleaps/helm-pkg/notification/values.yaml index 783782d3..3ea2aed5 100644 --- a/freeleaps/helm-pkg/notification/values.yaml +++ b/freeleaps/helm-pkg/notification/values.yaml @@ -61,6 +61,8 @@ notification: mongodbPort: "27017" # RABBITMQ_HOST rabbitmqHost: "" + # AUTH_SERVICE_ENDPOINT + authServiceEndpoint: "" # RABBITMQ_PORT rabbitmqPort: "" # RABBITMQ_USERNAME diff --git a/freeleaps/helm-pkg/payment/values.alpha.yaml b/freeleaps/helm-pkg/payment/values.alpha.yaml index 9891f280..6a57c7c2 100644 --- a/freeleaps/helm-pkg/payment/values.alpha.yaml +++ b/freeleaps/helm-pkg/payment/values.alpha.yaml @@ -15,7 +15,7 @@ payment: registry: docker.io repository: null name: payment - tag: snapshot-12a0d9a + tag: snapshot-38ff0ae imagePullPolicy: IfNotPresent ports: - name: http @@ -94,14 +94,14 @@ payment: creationPolicy: Owner refreshInterval: 30s data: - - key: mongodbUri - remoteRef: - key: "freeleaps-alpha-mongodb-uri" - type: Secret - - key: stripeApiKey - remoteRef: - key: "freeleaps-alpha-stripe-api-key" - type: Secret + - key: mongodbUri + remoteRef: + key: freeleaps-alpha-mongodb-uri + type: Secret + - key: stripeApiKey + remoteRef: + key: freeleaps-alpha-stripe-api-key + type: Secret vpa: minAllowed: enabled: false diff --git a/freeleaps/helm-pkg/payment/values.prod.yaml b/freeleaps/helm-pkg/payment/values.prod.yaml index 755cd8bb..d70f86b3 100644 --- a/freeleaps/helm-pkg/payment/values.prod.yaml +++ b/freeleaps/helm-pkg/payment/values.prod.yaml @@ -13,7 +13,7 @@ payment: registry: docker.io repository: null name: payment - tag: snapshot-046f9ff + tag: snapshot-4a5bdb4 imagePullPolicy: IfNotPresent ports: - name: http diff --git a/freeleaps/prod/ci/freeleaps-service-hub/Jenkinsfile b/freeleaps/prod/ci/freeleaps-service-hub/Jenkinsfile index 8c2d5678..a5f8ec5c 100644 --- a/freeleaps/prod/ci/freeleaps-service-hub/Jenkinsfile +++ b/freeleaps/prod/ci/freeleaps-service-hub/Jenkinsfile @@ -135,6 +135,27 @@ executeFreeleapsPipeline { imageReleaseArchitectures: ['linux/amd64', 'linux/arm64/v8'], registryCredentialsId: 'freeleaps-devops-docker-hub-credentials', semanticReleaseEnabled: true + ], + [ + name: 'metrics', + root: 'apps/metrcis', + language: 'python', + dependenciesManager: 'pip', + requirementsFile: 'requirements.txt', + buildCacheEnabled: true, + buildAgentImage: 'python:3.12-slim', + buildArtifacts: ['.'], + lintEnabled: false, + sastEnabled: false, + imageRegistry: 'docker.io', + imageRepository: 'freeleaps', + imageName: 'devops', + imageBuilder: 'dind', + dockerfilePath: 'Dockerfile', + imageBuildRoot: '.', + imageReleaseArchitectures: ['linux/amd64', 'linux/arm64/v8'], + registryCredentialsId: 'freeleaps-devops-docker-hub-credentials', + semanticReleaseEnabled: true ] ] } \ No newline at end of file