@maxim_mazurok/gapi.client.gkehub-v1 0.0.20230929 → 0.0.20231013

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.
Files changed (3) hide show
  1. package/index.d.ts +163 -11
  2. package/package.json +1 -1
  3. package/tests.ts +275 -1
package/index.d.ts CHANGED
@@ -9,7 +9,7 @@
9
9
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
10
10
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
11
11
  // Generated from: https://gkehub.googleapis.com/$discovery/rest?version=v1
12
- // Revision: 20230929
12
+ // Revision: 20231013
13
13
 
14
14
  /// <reference types="gapi.client" />
15
15
 
@@ -141,6 +141,9 @@ declare namespace gapi.client {
141
141
  /** Config Management-specific spec. */
142
142
  configmanagement?:
143
143
  ConfigManagementMembershipSpec;
144
+ /** Policy Controller spec. */
145
+ policycontroller?:
146
+ PolicyControllerMembershipSpec;
144
147
  }
145
148
  interface ConfigManagementConfigSync {
146
149
  /** Set to true to allow the vertical scaling. Defaults to false which disallows vertical scaling. This field is deprecated. */
@@ -1132,6 +1135,9 @@ declare namespace gapi.client {
1132
1135
  */
1133
1136
  origin?:
1134
1137
  Origin;
1138
+ /** Policy Controller spec. */
1139
+ policycontroller?:
1140
+ PolicyControllerMembershipSpec;
1135
1141
  }
1136
1142
  interface MembershipFeatureState {
1137
1143
  /** Appdevexperience specific state. */
@@ -1146,6 +1152,9 @@ declare namespace gapi.client {
1146
1152
  /** Identity Service-specific state. */
1147
1153
  identityservice?:
1148
1154
  IdentityServiceMembershipState;
1155
+ /** Policycontroller-specific state. */
1156
+ policycontroller?:
1157
+ PolicyControllerMembershipState;
1149
1158
  /** Service Mesh-specific state. */
1150
1159
  servicemesh?:
1151
1160
  ServiceMeshMembershipState;
@@ -1160,27 +1169,24 @@ declare namespace gapi.client {
1160
1169
  }
1161
1170
  interface MonitoringConfig {
1162
1171
  /**
1163
- * Immutable. Cluster name used to report metrics. For Anthos on VMWare/Baremetal, it would be in format `memberClusters/cluster_name`; And for Anthos on MultiCloud, it would be in
1164
- * format `{azureClusters, awsClusters}/cluster_name`.
1172
+ * Optional. Cluster name used to report metrics. For Anthos on VMWare/Baremetal/MultiCloud clusters, it would be in format {cluster_type}/{cluster_name}, e.g.,
1173
+ * "awsClusters/cluster_1".
1165
1174
  */
1166
1175
  cluster?:
1167
1176
  string;
1168
- /**
1169
- * Immutable. Cluster hash, this is a unique string generated by google code, which does not contain any PII, which we can use to reference the cluster. This is expected to be created
1170
- * by the monitoring stack and persisted into the Cluster object as well as to GKE-Hub.
1171
- */
1177
+ /** Optional. For GKE and Multicloud clusters, this is the UUID of the cluster resource. For VMWare and Baremetal clusters, this is the kube-system UID. */
1172
1178
  clusterHash?:
1173
1179
  string;
1174
1180
  /**
1175
- * Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos MultiCloud
1176
- * will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos
1181
+ * Optional. Kubernetes system metrics, if available, are written to this prefix. This defaults to kubernetes.io for GKE, and kubernetes.io/anthos for Anthos eventually. Noted: Anthos
1182
+ * MultiCloud will have kubernetes.io prefix today but will migration to be under kubernetes.io/anthos.
1177
1183
  */
1178
1184
  kubernetesMetricsPrefix?:
1179
1185
  string;
1180
- /** Immutable. Location used to report Metrics */
1186
+ /** Optional. Location used to report Metrics */
1181
1187
  location?:
1182
1188
  string;
1183
- /** Immutable. Project used to report Metrics */
1189
+ /** Optional. Project used to report Metrics */
1184
1190
  projectId?:
1185
1191
  string;
1186
1192
  }
@@ -1350,6 +1356,152 @@ declare namespace gapi.client {
1350
1356
  version?:
1351
1357
  number;
1352
1358
  }
1359
+ interface PolicyControllerBundleInstallSpec {
1360
+ /** The set of namespaces to be exempted from the bundle. */
1361
+ exemptedNamespaces?:
1362
+ string[];
1363
+ }
1364
+ interface PolicyControllerHubConfig {
1365
+ /** Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether. */
1366
+ auditIntervalSeconds?:
1367
+ string;
1368
+ /** The maximum number of audit violations to be stored in a constraint. If not set, the internal default (currently 20) will be used. */
1369
+ constraintViolationLimit?:
1370
+ string;
1371
+ /** Map of deployment configs to deployments ("admission", "audit", "mutation'). */
1372
+ deploymentConfigs?:
1373
+ { [P in string]: PolicyControllerPolicyControllerDeploymentConfig };
1374
+ /** The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster. */
1375
+ exemptableNamespaces?:
1376
+ string[];
1377
+ /**
1378
+ * The install_spec represents the intended state specified by the latest request that mutated install_spec in the feature spec, not the lifecycle state of the feature observed by the
1379
+ * Hub feature controller that is reported in the feature state.
1380
+ */
1381
+ installSpec?:
1382
+ string;
1383
+ /** Logs all denies and dry run failures. */
1384
+ logDeniesEnabled?:
1385
+ boolean;
1386
+ /** Monitoring specifies the configuration of monitoring. */
1387
+ monitoring?:
1388
+ PolicyControllerMonitoringConfig;
1389
+ /** Enables the ability to mutate resources using Policy Controller. */
1390
+ mutationEnabled?:
1391
+ boolean;
1392
+ /** Specifies the desired policy content on the cluster */
1393
+ policyContent?:
1394
+ PolicyControllerPolicyContentSpec;
1395
+ /** Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated. */
1396
+ referentialRulesEnabled?:
1397
+ boolean;
1398
+ }
1399
+ interface PolicyControllerMembershipSpec {
1400
+ /** Policy Controller configuration for the cluster. */
1401
+ policyControllerHubConfig?:
1402
+ PolicyControllerHubConfig;
1403
+ /** Version of Policy Controller installed. */
1404
+ version?:
1405
+ string;
1406
+ }
1407
+ interface PolicyControllerMembershipState {
1408
+ /** Currently these include (also serving as map keys): 1. "admission" 2. "audit" 3. "mutation" */
1409
+ componentStates?:
1410
+ { [P in string]: PolicyControllerOnClusterState };
1411
+ /** The overall content state observed by the Hub Feature controller. */
1412
+ policyContentState?:
1413
+ PolicyControllerPolicyContentState;
1414
+ /** The overall Policy Controller lifecycle state observed by the Hub Feature controller. */
1415
+ state?:
1416
+ string;
1417
+ }
1418
+ interface PolicyControllerMonitoringConfig {
1419
+ /** Specifies the list of backends Policy Controller will export to. An empty list would effectively disable metrics export. */
1420
+ backends?:
1421
+ string[];
1422
+ }
1423
+ interface PolicyControllerOnClusterState {
1424
+ /** Surface potential errors or information logs. */
1425
+ details?:
1426
+ string;
1427
+ /** The lifecycle state of this component. */
1428
+ state?:
1429
+ string;
1430
+ }
1431
+ interface PolicyControllerPolicyContentSpec {
1432
+ /** map of bundle name to BundleInstallSpec. The bundle name maps to the `bundleName` key in the `policycontroller.gke.io/constraintData` annotation on a constraint. */
1433
+ bundles?:
1434
+ { [P in string]: PolicyControllerBundleInstallSpec };
1435
+ /** Configures the installation of the Template Library. */
1436
+ templateLibrary?:
1437
+ PolicyControllerTemplateLibraryConfig;
1438
+ }
1439
+ interface PolicyControllerPolicyContentState {
1440
+ /** The state of the any bundles included in the chosen version of the manifest */
1441
+ bundleStates?:
1442
+ { [P in string]: PolicyControllerOnClusterState };
1443
+ /**
1444
+ * The state of the referential data sync configuration. This could represent the state of either the syncSet object(s) or the config object, depending on the version of PoCo
1445
+ * configured by the user.
1446
+ */
1447
+ referentialSyncConfigState?:
1448
+ PolicyControllerOnClusterState;
1449
+ /** The state of the template library */
1450
+ templateLibraryState?:
1451
+ PolicyControllerOnClusterState;
1452
+ }
1453
+ interface PolicyControllerPolicyControllerDeploymentConfig {
1454
+ /** Container resource requirements. */
1455
+ containerResources?:
1456
+ PolicyControllerResourceRequirements;
1457
+ /** Pod affinity configuration. */
1458
+ podAffinity?:
1459
+ string;
1460
+ /** Pod anti-affinity enablement. */
1461
+ podAntiAffinity?:
1462
+ boolean;
1463
+ /** Pod tolerations of node taints. */
1464
+ podTolerations?:
1465
+ PolicyControllerToleration[];
1466
+ /** Pod replica count. */
1467
+ replicaCount?:
1468
+ string;
1469
+ }
1470
+ interface PolicyControllerResourceList {
1471
+ /** CPU requirement expressed in Kubernetes resource units. */
1472
+ cpu?:
1473
+ string;
1474
+ /** Memory requirement expressed in Kubernetes resource units. */
1475
+ memory?:
1476
+ string;
1477
+ }
1478
+ interface PolicyControllerResourceRequirements {
1479
+ /** Limits describes the maximum amount of compute resources allowed for use by the running container. */
1480
+ limits?:
1481
+ PolicyControllerResourceList;
1482
+ /** Requests describes the amount of compute resources reserved for the container by the kube-scheduler. */
1483
+ requests?:
1484
+ PolicyControllerResourceList;
1485
+ }
1486
+ interface PolicyControllerTemplateLibraryConfig {
1487
+ /** Configures the manner in which the template library is installed on the cluster. */
1488
+ installation?:
1489
+ string;
1490
+ }
1491
+ interface PolicyControllerToleration {
1492
+ /** Matches a taint effect. */
1493
+ effect?:
1494
+ string;
1495
+ /** Matches a taint key (not necessarily unique). */
1496
+ key?:
1497
+ string;
1498
+ /** Matches a taint operator. */
1499
+ operator?:
1500
+ string;
1501
+ /** Matches a taint value. */
1502
+ value?:
1503
+ string;
1504
+ }
1353
1505
  interface RBACRoleBinding {
1354
1506
  /** Output only. When the rbacrolebinding was created. */
1355
1507
  createTime?:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maxim_mazurok/gapi.client.gkehub-v1",
3
- "version": "0.0.20230929",
3
+ "version": "0.0.20231013",
4
4
  "description": "TypeScript typings for GKE Hub API v1",
5
5
  "license": "MIT",
6
6
  "author": {
package/tests.ts CHANGED
@@ -3,7 +3,7 @@
3
3
  // This file was generated by https://github.com/Maxim-Mazurok/google-api-typings-generator. Please do not edit it manually.
4
4
  // In case of any problems please post issue to https://github.com/Maxim-Mazurok/google-api-typings-generator
5
5
 
6
- // Revision: 20230929
6
+ // Revision: 20231013
7
7
 
8
8
  gapi.load('client', async () => {
9
9
  /** now we can use gapi.client */
@@ -107,6 +107,62 @@ gapi.load('client', async () => {
107
107
  },
108
108
  version: "Test string",
109
109
  },
110
+ policycontroller: {
111
+ policyControllerHubConfig: {
112
+ auditIntervalSeconds: "Test string",
113
+ constraintViolationLimit: "Test string",
114
+ deploymentConfigs: {
115
+ A: {
116
+ containerResources: {
117
+ limits: {
118
+ cpu: "Test string",
119
+ memory: "Test string",
120
+ },
121
+ requests: {
122
+ cpu: "Test string",
123
+ memory: "Test string",
124
+ },
125
+ },
126
+ podAffinity: "Test string",
127
+ podAntiAffinity: true,
128
+ podTolerations: [
129
+ {
130
+ effect: "Test string",
131
+ key: "Test string",
132
+ operator: "Test string",
133
+ value: "Test string",
134
+ }
135
+ ],
136
+ replicaCount: "Test string",
137
+ }
138
+ },
139
+ exemptableNamespaces: [
140
+ "Test string"
141
+ ],
142
+ installSpec: "Test string",
143
+ logDeniesEnabled: true,
144
+ monitoring: {
145
+ backends: [
146
+ "Test string"
147
+ ],
148
+ },
149
+ mutationEnabled: true,
150
+ policyContent: {
151
+ bundles: {
152
+ A: {
153
+ exemptedNamespaces: [
154
+ "Test string"
155
+ ],
156
+ }
157
+ },
158
+ templateLibrary: {
159
+ installation: "Test string",
160
+ },
161
+ },
162
+ referentialRulesEnabled: true,
163
+ },
164
+ version: "Test string",
165
+ },
110
166
  },
111
167
  labels: {
112
168
  A: "Test string"
@@ -208,6 +264,62 @@ gapi.load('client', async () => {
208
264
  origin: {
209
265
  type: "Test string",
210
266
  },
267
+ policycontroller: {
268
+ policyControllerHubConfig: {
269
+ auditIntervalSeconds: "Test string",
270
+ constraintViolationLimit: "Test string",
271
+ deploymentConfigs: {
272
+ A: {
273
+ containerResources: {
274
+ limits: {
275
+ cpu: "Test string",
276
+ memory: "Test string",
277
+ },
278
+ requests: {
279
+ cpu: "Test string",
280
+ memory: "Test string",
281
+ },
282
+ },
283
+ podAffinity: "Test string",
284
+ podAntiAffinity: true,
285
+ podTolerations: [
286
+ {
287
+ effect: "Test string",
288
+ key: "Test string",
289
+ operator: "Test string",
290
+ value: "Test string",
291
+ }
292
+ ],
293
+ replicaCount: "Test string",
294
+ }
295
+ },
296
+ exemptableNamespaces: [
297
+ "Test string"
298
+ ],
299
+ installSpec: "Test string",
300
+ logDeniesEnabled: true,
301
+ monitoring: {
302
+ backends: [
303
+ "Test string"
304
+ ],
305
+ },
306
+ mutationEnabled: true,
307
+ policyContent: {
308
+ bundles: {
309
+ A: {
310
+ exemptedNamespaces: [
311
+ "Test string"
312
+ ],
313
+ }
314
+ },
315
+ templateLibrary: {
316
+ installation: "Test string",
317
+ },
318
+ },
319
+ referentialRulesEnabled: true,
320
+ },
321
+ version: "Test string",
322
+ },
211
323
  }
212
324
  },
213
325
  membershipStates: {
@@ -398,6 +510,31 @@ gapi.load('client', async () => {
398
510
  },
399
511
  state: "Test string",
400
512
  },
513
+ policycontroller: {
514
+ componentStates: {
515
+ A: {
516
+ details: "Test string",
517
+ state: "Test string",
518
+ }
519
+ },
520
+ policyContentState: {
521
+ bundleStates: {
522
+ A: {
523
+ details: "Test string",
524
+ state: "Test string",
525
+ }
526
+ },
527
+ referentialSyncConfigState: {
528
+ details: "Test string",
529
+ state: "Test string",
530
+ },
531
+ templateLibraryState: {
532
+ details: "Test string",
533
+ state: "Test string",
534
+ },
535
+ },
536
+ state: "Test string",
537
+ },
401
538
  servicemesh: {
402
539
  controlPlaneManagement: {
403
540
  details: [
@@ -591,6 +728,62 @@ gapi.load('client', async () => {
591
728
  },
592
729
  version: "Test string",
593
730
  },
731
+ policycontroller: {
732
+ policyControllerHubConfig: {
733
+ auditIntervalSeconds: "Test string",
734
+ constraintViolationLimit: "Test string",
735
+ deploymentConfigs: {
736
+ A: {
737
+ containerResources: {
738
+ limits: {
739
+ cpu: "Test string",
740
+ memory: "Test string",
741
+ },
742
+ requests: {
743
+ cpu: "Test string",
744
+ memory: "Test string",
745
+ },
746
+ },
747
+ podAffinity: "Test string",
748
+ podAntiAffinity: true,
749
+ podTolerations: [
750
+ {
751
+ effect: "Test string",
752
+ key: "Test string",
753
+ operator: "Test string",
754
+ value: "Test string",
755
+ }
756
+ ],
757
+ replicaCount: "Test string",
758
+ }
759
+ },
760
+ exemptableNamespaces: [
761
+ "Test string"
762
+ ],
763
+ installSpec: "Test string",
764
+ logDeniesEnabled: true,
765
+ monitoring: {
766
+ backends: [
767
+ "Test string"
768
+ ],
769
+ },
770
+ mutationEnabled: true,
771
+ policyContent: {
772
+ bundles: {
773
+ A: {
774
+ exemptedNamespaces: [
775
+ "Test string"
776
+ ],
777
+ }
778
+ },
779
+ templateLibrary: {
780
+ installation: "Test string",
781
+ },
782
+ },
783
+ referentialRulesEnabled: true,
784
+ },
785
+ version: "Test string",
786
+ },
594
787
  },
595
788
  labels: {
596
789
  A: "Test string"
@@ -692,6 +885,62 @@ gapi.load('client', async () => {
692
885
  origin: {
693
886
  type: "Test string",
694
887
  },
888
+ policycontroller: {
889
+ policyControllerHubConfig: {
890
+ auditIntervalSeconds: "Test string",
891
+ constraintViolationLimit: "Test string",
892
+ deploymentConfigs: {
893
+ A: {
894
+ containerResources: {
895
+ limits: {
896
+ cpu: "Test string",
897
+ memory: "Test string",
898
+ },
899
+ requests: {
900
+ cpu: "Test string",
901
+ memory: "Test string",
902
+ },
903
+ },
904
+ podAffinity: "Test string",
905
+ podAntiAffinity: true,
906
+ podTolerations: [
907
+ {
908
+ effect: "Test string",
909
+ key: "Test string",
910
+ operator: "Test string",
911
+ value: "Test string",
912
+ }
913
+ ],
914
+ replicaCount: "Test string",
915
+ }
916
+ },
917
+ exemptableNamespaces: [
918
+ "Test string"
919
+ ],
920
+ installSpec: "Test string",
921
+ logDeniesEnabled: true,
922
+ monitoring: {
923
+ backends: [
924
+ "Test string"
925
+ ],
926
+ },
927
+ mutationEnabled: true,
928
+ policyContent: {
929
+ bundles: {
930
+ A: {
931
+ exemptedNamespaces: [
932
+ "Test string"
933
+ ],
934
+ }
935
+ },
936
+ templateLibrary: {
937
+ installation: "Test string",
938
+ },
939
+ },
940
+ referentialRulesEnabled: true,
941
+ },
942
+ version: "Test string",
943
+ },
695
944
  }
696
945
  },
697
946
  membershipStates: {
@@ -882,6 +1131,31 @@ gapi.load('client', async () => {
882
1131
  },
883
1132
  state: "Test string",
884
1133
  },
1134
+ policycontroller: {
1135
+ componentStates: {
1136
+ A: {
1137
+ details: "Test string",
1138
+ state: "Test string",
1139
+ }
1140
+ },
1141
+ policyContentState: {
1142
+ bundleStates: {
1143
+ A: {
1144
+ details: "Test string",
1145
+ state: "Test string",
1146
+ }
1147
+ },
1148
+ referentialSyncConfigState: {
1149
+ details: "Test string",
1150
+ state: "Test string",
1151
+ },
1152
+ templateLibraryState: {
1153
+ details: "Test string",
1154
+ state: "Test string",
1155
+ },
1156
+ },
1157
+ state: "Test string",
1158
+ },
885
1159
  servicemesh: {
886
1160
  controlPlaneManagement: {
887
1161
  details: [