From a65d1966b38c9f22aba1eab8f4ecc91d5279bf3d Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Mon, 5 Sep 2022 11:45:00 +0800 Subject: [PATCH 1/5] =?UTF-8?q?feat:=20=E8=93=9D=E7=9B=BE=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E6=8C=81IPV6=20#7544?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../images/gateway/templates/gateway#vhosts#codecc.server.conf | 1 + .../codecc/templates/gateway#core#vhosts#codecc.server.conf | 1 + .../storage/templates/gateway#vhosts#bkrepo.docker.server.conf | 1 + .../storage/templates/gateway#vhosts#bkrepo.helm.server.conf | 1 + .../storage/templates/gateway#vhosts#bkrepo.server.conf | 2 ++ support-files/templates/gateway#core#devops.server.conf | 3 ++- 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/support-files/codecc/kubernetes/images/gateway/templates/gateway#vhosts#codecc.server.conf b/support-files/codecc/kubernetes/images/gateway/templates/gateway#vhosts#codecc.server.conf index e01bcb62711..5d787cc6bee 100644 --- a/support-files/codecc/kubernetes/images/gateway/templates/gateway#vhosts#codecc.server.conf +++ b/support-files/codecc/kubernetes/images/gateway/templates/gateway#vhosts#codecc.server.conf @@ -1,5 +1,6 @@ server { listen 80; + listen [::]:80; server_name __BK_CODECC_HOST__; access_log __BK_CODECC_LOGS_DIR__/nginx/codecc.access.$log_date.log devops_format; diff --git a/support-files/codecc/templates/gateway#core#vhosts#codecc.server.conf b/support-files/codecc/templates/gateway#core#vhosts#codecc.server.conf index d15aa0ec7d9..0d90172b632 100644 --- a/support-files/codecc/templates/gateway#core#vhosts#codecc.server.conf +++ b/support-files/codecc/templates/gateway#core#vhosts#codecc.server.conf @@ -1,5 +1,6 @@ server { listen 80; + listen [::]:80; server_name __BK_CODECC_FQDN__ __BK_CODECC_HOST__; # ### ssl config begin ### diff --git a/support-files/storage/templates/gateway#vhosts#bkrepo.docker.server.conf b/support-files/storage/templates/gateway#vhosts#bkrepo.docker.server.conf index 61dff10f6fd..5ad49efc053 100644 --- a/support-files/storage/templates/gateway#vhosts#bkrepo.docker.server.conf +++ b/support-files/storage/templates/gateway#vhosts#bkrepo.docker.server.conf @@ -1,5 +1,6 @@ server { listen __BK_REPO_DOCKER_HTTP_PORT__; + listen [::]:__BK_REPO_DOCKER_HTTP_PORT__; #listen __BK_REPO_DOCKER_HTTPS_PORT__ ssl; server_name "__BK_REPO_DOCKER_HOST__"; diff --git a/support-files/storage/templates/gateway#vhosts#bkrepo.helm.server.conf b/support-files/storage/templates/gateway#vhosts#bkrepo.helm.server.conf index d09dbf6ec5d..dda9d41d762 100644 --- a/support-files/storage/templates/gateway#vhosts#bkrepo.helm.server.conf +++ b/support-files/storage/templates/gateway#vhosts#bkrepo.helm.server.conf @@ -1,5 +1,6 @@ server { listen __BK_REPO_HELM_HTTP_PORT__; + listen [::]:__BK_REPO_HELM_HTTP_PORT__; server_name "__BK_REPO_HELM_HOST__"; if ($http_x_forwarded_proto = '') { diff --git a/support-files/storage/templates/gateway#vhosts#bkrepo.server.conf b/support-files/storage/templates/gateway#vhosts#bkrepo.server.conf index 448b562c1e3..b21ab30f377 100644 --- a/support-files/storage/templates/gateway#vhosts#bkrepo.server.conf +++ b/support-files/storage/templates/gateway#vhosts#bkrepo.server.conf @@ -1,8 +1,10 @@ server { listen __BK_REPO_HTTP_PORT__ ; + listen [::]:__BK_REPO_HTTP_PORT__; server_name "__BK_REPO_HOST__"; listen 8081; + listen [::]:8081; # ### ssl config begin ### # listen __BK_REPO_HTTPS_PORT__ ssl; # ssl_certificate __BK_REPO_CERT_PEM__; diff --git a/support-files/templates/gateway#core#devops.server.conf b/support-files/templates/gateway#core#devops.server.conf index 853eb209827..0c7c4b62758 100644 --- a/support-files/templates/gateway#core#devops.server.conf +++ b/support-files/templates/gateway#core#devops.server.conf @@ -1,5 +1,6 @@ server { - listen __BK_CI_HTTP_PORT__; + listen __BK_CI_HTTP_PORT__ default; + listen [::]:__BK_CI_HTTP_PORT__ default; server_name __BK_CI_FQDN__ __BK_CI_HOST__; # ### ssl config begin ### From b5f0eeba4d9c646ddc6ede6be793c48b71255690 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Thu, 22 Sep 2022 11:26:11 +0800 Subject: [PATCH 2/5] =?UTF-8?q?feat:=20=E8=93=9D=E7=9B=BE=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E6=8C=81IPV6=20#7544?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 9ab8f30024e..7f6861e79d9 100644 --- a/.gitignore +++ b/.gitignore @@ -44,6 +44,7 @@ helm-charts/core/ci/build/values.json helm-charts/core/ci/values.yaml helm-charts/core/ci/templates/configmap/tpl/ docker-images/core/ci/ci +docker-images/core/ci/ci-docker docker-images/core/ci/*.gz #turbo 忽略文件 From 07d259da15ca6ef72d88c7e9382fcfed17f455e3 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Thu, 22 Sep 2022 12:00:32 +0800 Subject: [PATCH 3/5] =?UTF-8?q?feat:=20=E8=93=9D=E7=9B=BE=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E6=8C=81IPV6=20#7544?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/ci/templates/stream/deployment.yaml | 240 +++++++++--------- helm-charts/core/ci/templates/stream/hpa.yaml | 76 +++--- .../core/ci/templates/stream/service.yaml | 50 ++-- 3 files changed, 183 insertions(+), 183 deletions(-) diff --git a/helm-charts/core/ci/templates/stream/deployment.yaml b/helm-charts/core/ci/templates/stream/deployment.yaml index 0d7700b3955..65dfd495051 100644 --- a/helm-charts/core/ci/templates/stream/deployment.yaml +++ b/helm-charts/core/ci/templates/stream/deployment.yaml @@ -1,120 +1,120 @@ -#stream Deployment -{{ if .Values.stream.enabled -}} -apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} -kind: Deployment -metadata: - name: {{ include "bkci.names.fullname" . }}-stream - labels: {{- include "bkci.labels.standard" . | nindent 4 }} - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - app.kubernetes.io/component: microservice - app.kubernetes.io/name: stream -spec: - selector: - matchLabels: {{- include "bkci.labels.matchLabels" . | nindent 6 }} - app.kubernetes.io/component: microservice - app.kubernetes.io/name: stream - {{- if not .Values.stream.autoscaling.enabled }} - replicas: {{ .Values.stream.replicas }} - {{- end }} - template: - metadata: - labels: {{- include "bkci.labels.standard" . | nindent 8 }} - {{- if .Values.stream.podLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.stream.podLabels "context" $) | nindent 8 }} - {{- end }} - app.kubernetes.io/component: microservice - app.kubernetes.io/name: stream - spec: - serviceAccountName: {{ .Values.rbac.serviceAccount }} - {{- if .Values.stream.hostAliases }} - hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.stream.hostAliases "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.stream.affinity }} - affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.affinity "context" $) | nindent 8 }} - {{- else }} - affinity: - podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAffinityPreset "context" $) | nindent 10 }} - podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAntiAffinityPreset "context" $) | nindent 10 }} - nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.stream.nodeAffinityPreset.type "key" .Values.stream.nodeAffinityPreset.key "values" .Values.stream.nodeAffinityPreset.values) | nindent 10 }} - {{- end }} - {{- if .Values.stream.nodeSelector }} - nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.nodeSelector "context" $) | nindent 8 }} - {{- end }} - {{- if .Values.stream.tolerations }} - tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.stream.tolerations "context" .) | nindent 8 }} - {{- end }} - {{- if .Values.stream.priorityClassName }} - priorityClassName: {{ .Values.stream.priorityClassName | quote }} - {{- end }} - {{- if .Values.stream.podSecurityContext.enabled }} - securityContext: {{- omit .Values.stream.podSecurityContext "enabled" | toYaml | nindent 8 }} - {{- end }} - containers: - - name: stream - image: {{ include "common.images.image" ( dict "imageRoot" .Values.backendImage "global" $) }} - imagePullPolicy: {{ .Values.backendImage.pullPolicy }} - {{- if .Values.stream.containerSecurityContext.enabled }} - securityContext: {{- omit .Values.stream.containerSecurityContext "enabled" | toYaml | nindent 12 }} - {{- end }} - {{- if .Values.stream.resources }} - resources: {{- toYaml .Values.stream.resources | nindent 12 }} - {{- end }} - ports: - - name: http - containerPort: 80 - env: - - name: MS_NAME - value: stream - - name: NAMESPACE - value: {{ .Release.Namespace }} - - name: RELEASE_NAME - value: {{ .Release.Name }} - - name: CHART_NAME - value: {{ .Chart.Name }} - - name: MULTI_CLUSTER - value: {{ .Values.multiCluster.enabled | quote }} - - name: DEFAULT_NAMESPACE - value: {{ .Values.multiCluster.defaultNamespace }} - - name: POD_NAME - valueFrom: - fieldRef: - apiVersion: v1 - fieldPath: metadata.name - workingDir: /data/workspace/stream - {{ if .Values.entrypoint.override }} - command: - - "/bin/bash" - - "-c" - - | - cp /data/workspace/backend.bkci.sh .; - /bin/bash backend.bkci.sh; - {{ end }} - livenessProbe: - httpGet: - path: /management/health/livenessState - port: http - initialDelaySeconds: 90 - periodSeconds: 15 - timeoutSeconds: 10 - failureThreshold: 5 - successThreshold: 1 - readinessProbe: - httpGet: - path: /management/health/readinessState - port: http - initialDelaySeconds: 60 - periodSeconds: 15 - timeoutSeconds: 10 - failureThreshold: 5 - successThreshold: 1 - volumeMounts: - - mountPath: /data/workspace/stream/jvm - name: log-volume - subPathExpr: bkci/jvm/$(POD_NAME) - volumes: - - hostPath: - path: /data - name: log-volume -{{- end -}} +#stream Deployment +{{ if .Values.stream.enabled -}} +apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} +kind: Deployment +metadata: + name: {{ include "bkci.names.fullname" . }}-stream + labels: {{- include "bkci.labels.standard" . | nindent 4 }} + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + app.kubernetes.io/component: microservice + app.kubernetes.io/name: stream +spec: + selector: + matchLabels: {{- include "bkci.labels.matchLabels" . | nindent 6 }} + app.kubernetes.io/component: microservice + app.kubernetes.io/name: stream + {{- if not .Values.stream.autoscaling.enabled }} + replicas: {{ .Values.stream.replicas }} + {{- end }} + template: + metadata: + labels: {{- include "bkci.labels.standard" . | nindent 8 }} + {{- if .Values.stream.podLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.stream.podLabels "context" $) | nindent 8 }} + {{- end }} + app.kubernetes.io/component: microservice + app.kubernetes.io/name: stream + spec: + serviceAccountName: {{ .Values.rbac.serviceAccount }} + {{- if .Values.stream.hostAliases }} + hostAliases: {{- include "common.tplvalues.render" (dict "value" .Values.stream.hostAliases "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.stream.affinity }} + affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.affinity "context" $) | nindent 8 }} + {{- else }} + affinity: + podAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAffinityPreset "context" $) | nindent 10 }} + podAntiAffinity: {{- include "common.affinities.pods" (dict "type" .Values.stream.podAntiAffinityPreset "context" $) | nindent 10 }} + nodeAffinity: {{- include "common.affinities.nodes" (dict "type" .Values.stream.nodeAffinityPreset.type "key" .Values.stream.nodeAffinityPreset.key "values" .Values.stream.nodeAffinityPreset.values) | nindent 10 }} + {{- end }} + {{- if .Values.stream.nodeSelector }} + nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.stream.nodeSelector "context" $) | nindent 8 }} + {{- end }} + {{- if .Values.stream.tolerations }} + tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.stream.tolerations "context" .) | nindent 8 }} + {{- end }} + {{- if .Values.stream.priorityClassName }} + priorityClassName: {{ .Values.stream.priorityClassName | quote }} + {{- end }} + {{- if .Values.stream.podSecurityContext.enabled }} + securityContext: {{- omit .Values.stream.podSecurityContext "enabled" | toYaml | nindent 8 }} + {{- end }} + containers: + - name: stream + image: {{ include "common.images.image" ( dict "imageRoot" .Values.backendImage "global" $) }} + imagePullPolicy: {{ .Values.backendImage.pullPolicy }} + {{- if .Values.stream.containerSecurityContext.enabled }} + securityContext: {{- omit .Values.stream.containerSecurityContext "enabled" | toYaml | nindent 12 }} + {{- end }} + {{- if .Values.stream.resources }} + resources: {{- toYaml .Values.stream.resources | nindent 12 }} + {{- end }} + ports: + - name: http + containerPort: 80 + env: + - name: MS_NAME + value: stream + - name: NAMESPACE + value: {{ .Release.Namespace }} + - name: RELEASE_NAME + value: {{ .Release.Name }} + - name: CHART_NAME + value: {{ .Chart.Name }} + - name: MULTI_CLUSTER + value: {{ .Values.multiCluster.enabled | quote }} + - name: DEFAULT_NAMESPACE + value: {{ .Values.multiCluster.defaultNamespace }} + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + workingDir: /data/workspace/stream + {{ if .Values.entrypoint.override }} + command: + - "/bin/bash" + - "-c" + - | + cp /data/workspace/backend.bkci.sh .; + /bin/bash backend.bkci.sh; + {{ end }} + livenessProbe: + httpGet: + path: /management/health/livenessState + port: http + initialDelaySeconds: 90 + periodSeconds: 15 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 1 + readinessProbe: + httpGet: + path: /management/health/readinessState + port: http + initialDelaySeconds: 60 + periodSeconds: 15 + timeoutSeconds: 10 + failureThreshold: 5 + successThreshold: 1 + volumeMounts: + - mountPath: /data/workspace/stream/jvm + name: log-volume + subPathExpr: bkci/jvm/$(POD_NAME) + volumes: + - hostPath: + path: /data + name: log-volume +{{- end -}} diff --git a/helm-charts/core/ci/templates/stream/hpa.yaml b/helm-charts/core/ci/templates/stream/hpa.yaml index e2d4380989c..51ddeb16edc 100644 --- a/helm-charts/core/ci/templates/stream/hpa.yaml +++ b/helm-charts/core/ci/templates/stream/hpa.yaml @@ -1,38 +1,38 @@ -# stream hpa -{{ if .Values.stream.enabled -}} -{{ if .Values.stream.autoscaling.enabled }} -apiVersion: autoscaling/v2beta1 -kind: HorizontalPodAutoscaler -metadata: - name: {{ include "bkci.names.fullname" . }}-stream - labels: {{- include "bkci.labels.standard" . | nindent 4 }} - app.kubernetes.io/name: stream - app.kubernetes.io/component: microservice - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} -spec: - scaleTargetRef: - apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} - kind: Deployment - name: {{ include "bkci.names.fullname" . }}-stream - minReplicas: {{ .Values.stream.autoscaling.minReplicas }} - maxReplicas: {{ .Values.stream.autoscaling.maxReplicas }} - metrics: - {{- if .Values.stream.autoscaling.targetCPU }} - - type: Resource - resource: - name: cpu - targetAverageUtilization: {{ .Values.stream.autoscaling.targetCPU }} - {{- end }} - {{- if .Values.stream.autoscaling.targetMemory }} - - type: Resource - resource: - name: memory - targetAverageUtilization: {{ .Values.stream.autoscaling.targetMemory }} - {{- end }} -{{- end }} -{{- end -}} +# stream hpa +{{ if .Values.stream.enabled -}} +{{ if .Values.stream.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "bkci.names.fullname" . }}-stream + labels: {{- include "bkci.labels.standard" . | nindent 4 }} + app.kubernetes.io/name: stream + app.kubernetes.io/component: microservice + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +spec: + scaleTargetRef: + apiVersion: {{ include "common.capabilities.deployment.apiVersion" . }} + kind: Deployment + name: {{ include "bkci.names.fullname" . }}-stream + minReplicas: {{ .Values.stream.autoscaling.minReplicas }} + maxReplicas: {{ .Values.stream.autoscaling.maxReplicas }} + metrics: + {{- if .Values.stream.autoscaling.targetCPU }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.stream.autoscaling.targetCPU }} + {{- end }} + {{- if .Values.stream.autoscaling.targetMemory }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.stream.autoscaling.targetMemory }} + {{- end }} +{{- end }} +{{- end -}} diff --git a/helm-charts/core/ci/templates/stream/service.yaml b/helm-charts/core/ci/templates/stream/service.yaml index 5b43ef2e0d7..b67aaa0b847 100644 --- a/helm-charts/core/ci/templates/stream/service.yaml +++ b/helm-charts/core/ci/templates/stream/service.yaml @@ -1,25 +1,25 @@ -{{ if .Values.stream.enabled -}} -apiVersion: v1 -kind: Service -metadata: - name: {{ include "bkci.names.fullname" . }}-stream - labels: {{- include "bkci.labels.standard" . | nindent 4 }} - app.kubernetes.io/name: stream - app.kubernetes.io/component: microservice - {{- if .Values.commonLabels }} - {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} - {{- end }} - {{- if .Values.commonAnnotations }} - annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} - {{- end }} -spec: - type: ClusterIP - selector: {{- include "bkci.labels.matchLabels" . | nindent 4 }} - app.kubernetes.io/component: microservice - app.kubernetes.io/name: stream - ports: - - name: http - port: 80 - targetPort: 80 - protocol: TCP -{{- end -}} +{{ if .Values.stream.enabled -}} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "bkci.names.fullname" . }}-stream + labels: {{- include "bkci.labels.standard" . | nindent 4 }} + app.kubernetes.io/name: stream + app.kubernetes.io/component: microservice + {{- if .Values.commonLabels }} + {{- include "common.tplvalues.render" (dict "value" .Values.commonLabels "context" $) | nindent 4 }} + {{- end }} + {{- if .Values.commonAnnotations }} + annotations: {{- include "common.tplvalues.render" (dict "value" .Values.commonAnnotations "context" $) | nindent 4 }} + {{- end }} +spec: + type: ClusterIP + selector: {{- include "bkci.labels.matchLabels" . | nindent 4 }} + app.kubernetes.io/component: microservice + app.kubernetes.io/name: stream + ports: + - name: http + port: 80 + targetPort: 80 + protocol: TCP +{{- end -}} From 02148b0bd9d4816b8b676ecfcef6d49571931f34 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Fri, 23 Sep 2022 10:55:16 +0800 Subject: [PATCH 4/5] =?UTF-8?q?feat:=20=E8=93=9D=E7=9B=BE=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E6=8C=81IPV6=20#7544?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helm-charts/core/ci/build_chart.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/helm-charts/core/ci/build_chart.py b/helm-charts/core/ci/build_chart.py index 32c46c6df28..6b2a259034c 100755 --- a/helm-charts/core/ci/build_chart.py +++ b/helm-charts/core/ci/build_chart.py @@ -43,9 +43,11 @@ 'bkCiDocsUrl': 'https://bk.tencent.com/docs/markdown/持续集成平台/产品白皮书', 'bkCiArtifactoryRealm': 'local', 'bkRepoHost': 'repo.demo.com', + 'bkRepoFqdn': 'repo.demo.com', 'bkRepoGatewayIp': '127.0.0.1', 'bkCiStreamScmType': 'CODE_GIT', 'bkCiStreamUrl': 'devops.example.com', + 'bkCiStreamHost': 'devops.example.com', 'bkCiStreamGitUrl': 'www.github.com', 'bkCiClusterTag': 'devops', 'bkCiRepositoryGithubServer':'repository', From e08e2c94e658f3782df5087a049572ec52e3c567 Mon Sep 17 00:00:00 2001 From: stubenhuang Date: Fri, 23 Sep 2022 11:27:03 +0800 Subject: [PATCH 5/5] =?UTF-8?q?feat:=20=E8=93=9D=E7=9B=BE=E7=BD=91?= =?UTF-8?q?=E5=85=B3=E6=94=AF=E6=8C=81IPV6=20#7544?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- helm-charts/core/ci/templates/artifactory/statefulset.yaml | 2 +- .../main/kotlin/com/tencent/devops/auth/AuthConfiguration.kt | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/helm-charts/core/ci/templates/artifactory/statefulset.yaml b/helm-charts/core/ci/templates/artifactory/statefulset.yaml index f40a606fe55..d9f9bb596cd 100644 --- a/helm-charts/core/ci/templates/artifactory/statefulset.yaml +++ b/helm-charts/core/ci/templates/artifactory/statefulset.yaml @@ -131,7 +131,7 @@ spec: subPathExpr: bkci/jvm/$(POD_NAME) volumes: - name: storage - {{- if .Values.persistence.enabled }} + {{- if and .Values.persistence.enabled (eq .Values.config.bkCiArtifactoryRealm "local") }} persistentVolumeClaim: claimName: {{ if .Values.persistence.existingClaim }}{{ .Values.persistence.existingClaim }}{{- else }}{{ template "bkci.names.fullname" . }}-storage{{- end }} {{- else }} diff --git a/src/backend/ci/core/auth/biz-auth-blueking/src/main/kotlin/com/tencent/devops/auth/AuthConfiguration.kt b/src/backend/ci/core/auth/biz-auth-blueking/src/main/kotlin/com/tencent/devops/auth/AuthConfiguration.kt index ad1c5a3c2bd..45f471b6a6e 100644 --- a/src/backend/ci/core/auth/biz-auth-blueking/src/main/kotlin/com/tencent/devops/auth/AuthConfiguration.kt +++ b/src/backend/ci/core/auth/biz-auth-blueking/src/main/kotlin/com/tencent/devops/auth/AuthConfiguration.kt @@ -109,6 +109,7 @@ class AuthConfiguration { fun iamManagerService() = ManagerServiceImpl(apigwHttpClientServiceImpl(), iamConfiguration()) @Bean + @Primary @ConditionalOnProperty(prefix = "auth", name = ["idProvider"], havingValue = "bk_login") fun deptService( redisOperation: RedisOperation, @@ -116,6 +117,7 @@ class AuthConfiguration { ) = AuthDeptServiceImpl(redisOperation, objectMapper) @Bean + @Primary @ConditionalOnProperty(prefix = "auth", name = ["idProvider"], havingValue = "bk_login_v3") fun v3permissionService( authHelper: AuthHelper, @@ -125,6 +127,7 @@ class AuthConfiguration { ) = BkPermissionService(authHelper, policyService, iamConfiguration, iamCacheService) @Bean + @Primary @ConditionalOnProperty(prefix = "auth", name = ["idProvider"], havingValue = "bk_login_v3") fun v3permissionProjectService( permissionRoleService: PermissionRoleService,