@daocloud-proto/kpanda 0.17.0-dev-9e940740 → 0.17.0-dev-355d575e

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,20 @@ export enum NamespacePhase {
13
13
  Terminating = "Terminating",
14
14
  }
15
15
 
16
+ export enum Level {
17
+ LEVEL_UNSPECIFIED = "LEVEL_UNSPECIFIED",
18
+ privileged = "privileged",
19
+ baseline = "baseline",
20
+ restricted = "restricted",
21
+ }
22
+
23
+ export enum Mode {
24
+ MODE_UNSPECIFIED = "MODE_UNSPECIFIED",
25
+ enforce = "enforce",
26
+ audit = "audit",
27
+ warn = "warn",
28
+ }
29
+
16
30
  export enum ListClusterNamespaceSummaryResponseScope {
17
31
  SCOPE_UNSPECIFIED = "SCOPE_UNSPECIFIED",
18
32
  Cluster = "Cluster",
@@ -34,6 +48,7 @@ export type NamespaceStatus = {
34
48
  readyPodNumber?: number
35
49
  totalPodNumber?: number
36
50
  conditions?: KpandaIoApiTypesObjectmeta.Condition[]
51
+ podSecurityEnabled?: boolean
37
52
  }
38
53
 
39
54
  export type NamespaceCondition = {
@@ -151,4 +166,20 @@ export type PatchNamespaceResponse = {
151
166
  export type DeleteNamespaceRequest = {
152
167
  cluster?: string
153
168
  name?: string
169
+ }
170
+
171
+ export type EnableNamespacePodSecurityRequest = {
172
+ cluster?: string
173
+ name?: string
174
+ podSecurity?: PodSecurity[]
175
+ }
176
+
177
+ export type PodSecurity = {
178
+ level?: Level
179
+ mode?: Mode
180
+ }
181
+
182
+ export type DisableNamespacePodSecurityRequest = {
183
+ cluster?: string
184
+ name?: string
154
185
  }
@@ -424,6 +424,12 @@ export class Core {
424
424
  static PatchNamespace(req: KpandaIoApiCoreV1alpha1Namespace.PatchNamespaceRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Namespace.PatchNamespaceResponse> {
425
425
  return fm.fetchReq<KpandaIoApiCoreV1alpha1Namespace.PatchNamespaceRequest, KpandaIoApiCoreV1alpha1Namespace.PatchNamespaceResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["name"]}`, {...initReq, method: "PATCH", body: JSON.stringify(req)})
426
426
  }
427
+ static EnableNamespacePodSecurity(req: KpandaIoApiCoreV1alpha1Namespace.EnableNamespacePodSecurityRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Namespace.Namespace> {
428
+ return fm.fetchReq<KpandaIoApiCoreV1alpha1Namespace.EnableNamespacePodSecurityRequest, KpandaIoApiCoreV1alpha1Namespace.Namespace>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["name"]}/podsecurity:enable`, {...initReq, method: "POST", body: JSON.stringify(req)})
429
+ }
430
+ static DisableNamespacePodSecurity(req: KpandaIoApiCoreV1alpha1Namespace.DisableNamespacePodSecurityRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Namespace.Namespace> {
431
+ return fm.fetchReq<KpandaIoApiCoreV1alpha1Namespace.DisableNamespacePodSecurityRequest, KpandaIoApiCoreV1alpha1Namespace.Namespace>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/namespaces/${req["name"]}/podsecurity:disable`, {...initReq, method: "POST", body: JSON.stringify(req)})
432
+ }
427
433
  static ListServiceAccounts(req: KpandaIoApiCoreV1alpha1Serviceaccount.ListServiceAccountsRequest, initReq?: fm.InitReq): Promise<KpandaIoApiCoreV1alpha1Serviceaccount.ListServiceAccountsResponse> {
428
434
  return fm.fetchReq<KpandaIoApiCoreV1alpha1Serviceaccount.ListServiceAccountsRequest, KpandaIoApiCoreV1alpha1Serviceaccount.ListServiceAccountsResponse>(`/apis/kpanda.io/v1alpha1/clusters/${req["cluster"]}/serviceaccounts?${fm.renderURLSearchParams(req, ["cluster"])}`, {...initReq, method: "GET"})
429
435
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name":"@daocloud-proto/kpanda",
3
- "version":"v0.17.0-dev-9e940740",
3
+ "version":"v0.17.0-dev-355d575e",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {