Skip to content

Commit

Permalink
Merge branch 'TencentBlueKing:master' into issue_2564
Browse files Browse the repository at this point in the history
  • Loading branch information
lannoy0523 authored Jan 10, 2025
2 parents 01afa65 + 355a402 commit 44c93f2
Show file tree
Hide file tree
Showing 14 changed files with 64 additions and 44 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ interface PackageService {
repoName: String,
packageKey: String,
versionName: String,
realIpAddress: String? = null,
contentPath: String? = null,
realIpAddress: String? = null
)

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ class PackageServiceImpl(
repoName: String,
packageKey: String,
versionName: String,
realIpAddress: String?,
contentPath: String?,
realIpAddress: String?
) {
var tPackage = packageDao.findByKeyExcludeHistoryVersion(projectId, repoName, packageKey) ?: return
val packageId = tPackage.id!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,11 +85,11 @@ class EdgePackageServiceImpl(
repoName: String,
packageKey: String,
versionName: String,
realIpAddress: String?,
contentPath: String?,
realIpAddress: String?
) {
centerPackageClient.deleteVersion(projectId, repoName, packageKey, versionName, contentPath, realIpAddress)
super.deleteVersion(projectId, repoName, packageKey, versionName, contentPath, realIpAddress)
centerPackageClient.deleteVersion(projectId, repoName, packageKey, versionName, realIpAddress, contentPath)
super.deleteVersion(projectId, repoName, packageKey, versionName, realIpAddress, contentPath)
}

override fun deletePackage(projectId: String, repoName: String, packageKey: String, realIpAddress: String?) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ class PypiLocalRepository(
context.repoName,
packageKey,
version,
HttpContextHolder.getClientAddress(),
contentPath,
HttpContextHolder.getClientAddress()
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,8 @@ interface PackageClient {
@PathVariable repoName: String,
@RequestParam packageKey: String,
@RequestParam version: String,
@RequestParam realIpAddress: String? = null,
@RequestParam contentPath: String? = null,
@RequestParam realIpAddress: String? = null
): Response<Void>

@ApiOperation("更新包")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ interface ClusterPackageClient {
@PathVariable repoName: String,
@RequestParam packageKey: String,
@RequestParam version: String,
@RequestParam realIpAddress: String? = null,
@RequestParam contentPath: String? = null,
@RequestParam realIpAddress: String? = null
): Response<Void>

@ApiOperation("更新包")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ class ClusterPackageController(
repoName: String,
packageKey: String,
version: String,
realIpAddress: String?,
contentPath: String?,
realIpAddress: String?
): Response<Void> {
permissionManager.checkRepoPermission(PermissionAction.WRITE, projectId, repoName)
packageService.deleteVersion(projectId, repoName, packageKey, version, contentPath, realIpAddress)
packageService.deleteVersion(projectId, repoName, packageKey, version, realIpAddress, contentPath)
return ResponseBuilder.success()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ class PackageController(
repoName: String,
packageKey: String,
version: String,
realIpAddress: String?,
contentPath: String?,
realIpAddress: String?
): Response<Void> {
packageService.deleteVersion(projectId, repoName, packageKey, version, contentPath, realIpAddress)
packageService.deleteVersion(projectId, repoName, packageKey, version, realIpAddress, contentPath)
return ResponseBuilder.success()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class UserPackageController(
@RequestParam version: String,
@RequestParam contentPath: String?
): Response<Void> {
packageService.deleteVersion(projectId, repoName, packageKey, version, contentPath)
packageService.deleteVersion(projectId, repoName, packageKey, version, null, contentPath)
return ResponseBuilder.success()
}

Expand Down
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 44c93f2

Please sign in to comment.