chore: 修改K8S资源池权限模版的名称

This commit is contained in:
CaptainB 2023-02-03 13:14:02 +08:00
parent aaf3421d25
commit 4dcec3db5b
2 changed files with 4 additions and 4 deletions

View File

@ -123,7 +123,7 @@
trigger="hover">
<div>
<strong>{{ $t('test_resource_pool.k8s_sa_tips') }}</strong><br>
<el-link type="primary" @click="downloadYaml(item, 'sa')">sa.yaml</el-link>
<el-link type="primary" @click="downloadYaml(item, 'role')">role.yaml</el-link>
</div>
<div style="padding-top: 20px">

View File

@ -91,7 +91,7 @@ spec:
name: metersphere-logs
`;
const sa = `apiVersion: rbac.authorization.k8s.io/v1beta1
const role = `apiVersion: rbac.authorization.k8s.io/v1beta1
kind: Role
metadata:
name: metersphere
@ -177,8 +177,8 @@ export function getYaml(type, name, namespace, image) {
.replace('{namespace}', namespace)
.replace('{image}', image);
}
if (type === 'sa') {
return sa.replace('{namespace}', namespace);
if (type === 'role') {
return role.replace('{namespace}', namespace);
}
}