Skip to content

Commit

Permalink
fix: 修改preview chart #2898
Browse files Browse the repository at this point in the history
* fix: 修改preview chart #2898

* fix: 修改preview chart #2898

* fix: 修改preview chart #2898

* fix: 修改preview chart #2898

* fix: 修改preview chart #2898

* fix: 修改preview chart #2898

* fix: 修改preview chart #2898
  • Loading branch information
owenlxu authored Jan 10, 2025
1 parent 82cacb2 commit 355a402
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,4 @@ metadata:
{{- end }}
data:
application.yml: |-
preview:
domain: {{ .Values.bkDomainScheme }}://{{ .Values.gateway.host }}/preview
{{- if keys $.Values.preview.config }}
{{- toYaml .Values.preview.config | nindent 6 }}
{{- end}}
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -56,28 +56,6 @@ spec:
securityContext: {{- omit .Values.preview.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
containers:
{{- if .Values.bkstore.enabled }}
- name: plugin-bkstore
image: {{ include "bkrepo.images.image" ( dict "imageRoot" .Values.bkstore.image "global" .Values.global "bkrepo" .Values.common) }}
args:
- /bin/sh
- -c
- cp /data/workspace/plugin*jar /data/workspace/plugin/; sleep infinity
volumeMounts:
- name: shared-data
mountPath: /data/workspace/plugin/
{{- end }}
{{- if .Values.gitci.enabled }}
- name: plugin-gitci
image: {{ include "bkrepo.images.image" ( dict "imageRoot" .Values.gitci.image "global" .Values.global "bkrepo" .Values.common) }}
args:
- /bin/sh
- -c
- cp /data/workspace/plugin*jar /data/workspace/plugin/; sleep infinity
volumeMounts:
- name: shared-data
mountPath: /data/workspace/plugin/
{{- end }}
- name: preview
image: {{ include "bkrepo.images.image" ( dict "imageRoot" .Values.preview.image "global" .Values.global "bkrepo" .Values.common) }}
imagePullPolicy: {{ .Values.preview.image.pullPolicy }}
Expand Down Expand Up @@ -119,8 +97,6 @@ spec:
volumeMounts:
- name: storage
mountPath: {{ .Values.common.mountPath }}
- name: shared-data
mountPath: /data/workspace/plugin/
volumes:
- name: storage
{{- if .Values.common.config.storage.nfs.enabled }}
Expand All @@ -132,6 +108,4 @@ spec:
{{- else }}
emptyDir: {}
{{- end }}
- name: shared-data
emptyDir: {}
{{- end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.rbac.create -}}
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: ClusterRole
metadata:
name: {{ include "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
rules:
- apiGroups:
- ""
- apps
- extensions
resources:
- configmaps
- services
- secrets
- endpoints
- persistentvolumeclaims
verbs:
- get
- watch
- list
{{- end -}}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{{- if .Values.rbac.create -}}
apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}
kind: ClusterRoleBinding
metadata:
name: {{ include "common.names.fullname" . }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
{{- 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 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ include "common.names.fullname" . }}
subjects:
- kind: ServiceAccount
namespace: {{ .Release.Namespace }}
name: {{ include "bkrepo.serviceAccountName" . }}
{{- end -}}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ metadata:
rules:
- apiGroups:
- ""
- apps
- extensions
resources:
- configmaps
- services
Expand Down

0 comments on commit 355a402

Please sign in to comment.