feat(kubernetes-plugin): add secrets rendering (#31415)

* feat: mask secret datas

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add secrets accordion

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add test code for secrets accordion

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* feat: add test code for secrets fetch

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: changeset

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: yarn build:api-reports

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: remove secrets from default object and rollback test code

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: extract to helper function

Signed-off-by: 김병준 <kingbj0429@gmail.com>

* chore: add test code for helper function

Signed-off-by: 김병준 <kingbj0429@gmail.com>

---------

Signed-off-by: 김병준 <kingbj0429@gmail.com>
This commit is contained in:
KoB
2025-12-02 09:35:34 +09:00
committed by GitHub
parent f966a8557f
commit 8fa8d87e3b
15 changed files with 568 additions and 7 deletions
+11
View File
@@ -254,6 +254,7 @@ export type FetchResponse =
| PodFetchResponse
| ServiceFetchResponse
| ConfigMapFetchResponse
| SecretFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchResponse
| ResourceQuotaFetchResponse
@@ -283,6 +284,8 @@ export interface GroupedResponses extends DeploymentResources {
// (undocumented)
jobs: V1Job[];
// (undocumented)
secrets: V1Secret[];
// (undocumented)
services: V1Service[];
// (undocumented)
statefulsets: V1StatefulSet[];
@@ -447,6 +450,14 @@ export interface ResourceRef {
namespace: string;
}
// @public (undocumented)
export interface SecretFetchResponse {
// (undocumented)
resources: Array<V1Secret>;
// (undocumented)
type: 'secrets';
}
// @public (undocumented)
export interface SecretsFetchResponse {
// (undocumented)
+8
View File
@@ -129,6 +129,7 @@ export type FetchResponse =
| PodFetchResponse
| ServiceFetchResponse
| ConfigMapFetchResponse
| SecretFetchResponse
| DeploymentFetchResponse
| LimitRangeFetchResponse
| ResourceQuotaFetchResponse
@@ -161,6 +162,12 @@ export interface ConfigMapFetchResponse {
resources: Array<V1ConfigMap>;
}
/** @public */
export interface SecretFetchResponse {
type: 'secrets';
resources: Array<V1Secret>;
}
/** @public */
export interface DeploymentFetchResponse {
type: 'deployments';
@@ -297,6 +304,7 @@ export interface DeploymentResources {
export interface GroupedResponses extends DeploymentResources {
services: V1Service[];
configMaps: V1ConfigMap[];
secrets: V1Secret[];
ingresses: V1Ingress[];
jobs: V1Job[];
cronJobs: V1CronJob[];
@@ -40,6 +40,9 @@ export const groupResponses = (
case 'configmaps':
prev.configMaps.push(...next.resources);
break;
case 'secrets':
prev.secrets.push(...next.resources);
break;
case 'horizontalpodautoscalers':
prev.horizontalPodAutoscalers.push(...next.resources);
break;
@@ -71,6 +74,7 @@ export const groupResponses = (
deployments: [],
services: [],
configMaps: [],
secrets: [],
horizontalPodAutoscalers: [],
ingresses: [],
jobs: [],