pepr 0.46.3-nightly.1 → 0.46.3-nightly.10
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.
- package/dist/cli/build.helpers.d.ts.map +1 -1
- package/dist/cli/init/index.d.ts.map +1 -1
- package/dist/cli/init/templates.d.ts +4 -3
- package/dist/cli/init/templates.d.ts.map +1 -1
- package/dist/cli/init/walkthrough.d.ts +1 -0
- package/dist/cli/init/walkthrough.d.ts.map +1 -1
- package/dist/cli/types.d.ts +1 -1
- package/dist/cli/types.d.ts.map +1 -1
- package/dist/cli.js +493 -459
- package/dist/controller.js +1 -1
- package/dist/lib/assets/assets.d.ts +3 -2
- package/dist/lib/assets/assets.d.ts.map +1 -1
- package/dist/lib/assets/envrionment.d.ts +4 -0
- package/dist/lib/assets/envrionment.d.ts.map +1 -0
- package/dist/lib/assets/pods.d.ts +1 -3
- package/dist/lib/assets/pods.d.ts.map +1 -1
- package/dist/lib/assets/yaml/overridesFile.d.ts +1 -2
- package/dist/lib/assets/yaml/overridesFile.d.ts.map +1 -1
- package/dist/lib/filter/adjudication.d.ts +22 -0
- package/dist/lib/filter/adjudication.d.ts.map +1 -0
- package/dist/lib/filter/filter.d.ts +0 -19
- package/dist/lib/filter/filter.d.ts.map +1 -1
- package/dist/lib/types.d.ts +1 -0
- package/dist/lib/types.d.ts.map +1 -1
- package/dist/lib.js +229 -229
- package/dist/lib.js.map +4 -4
- package/package.json +7 -5
- package/src/cli/build.helpers.ts +3 -2
- package/src/cli/init/index.ts +20 -3
- package/src/cli/init/templates.ts +3 -3
- package/src/cli/init/walkthrough.ts +20 -0
- package/src/cli/types.ts +1 -1
- package/src/lib/assets/assets.ts +24 -5
- package/src/lib/assets/envrionment.ts +26 -0
- package/src/lib/assets/pods.ts +2 -26
- package/src/lib/assets/yaml/overridesFile.ts +2 -3
- package/src/lib/filter/adjudication.ts +196 -0
- package/src/lib/filter/filter.ts +20 -194
- package/src/lib/types.ts +1 -0
- package/src/fixtures/data/admission-create-clusterrole.json +0 -52
- package/src/fixtures/data/admission-create-deployment.json +0 -93
- package/src/fixtures/data/admission-create-pod.json +0 -272
- package/src/fixtures/data/admission-delete-pod.json +0 -272
- package/src/fixtures/loader.ts +0 -28
package/src/lib/filter/filter.ts
CHANGED
|
@@ -1,57 +1,30 @@
|
|
|
1
1
|
// SPDX-License-Identifier: Apache-2.0
|
|
2
2
|
// SPDX-FileCopyrightText: 2023-Present The Pepr Authors
|
|
3
3
|
|
|
4
|
-
import { Binding } from "../types";
|
|
4
|
+
import { AdjudicationResult, Binding } from "../types";
|
|
5
5
|
import { Operation } from "../enums";
|
|
6
6
|
import { KubernetesObject } from "kubernetes-fluent-client";
|
|
7
|
-
import {
|
|
8
|
-
carriesIgnoredNamespace,
|
|
9
|
-
misboundDeleteWithDeletionTimestamp,
|
|
10
|
-
misboundNamespace,
|
|
11
|
-
missingCarriableNamespace,
|
|
12
|
-
unbindableNamespaces,
|
|
13
|
-
uncarryableNamespace,
|
|
14
|
-
} from "./adjudicators/postCollection";
|
|
15
|
-
import {
|
|
16
|
-
declaredOperation,
|
|
17
|
-
declaredGroup,
|
|
18
|
-
declaredVersion,
|
|
19
|
-
declaredKind,
|
|
20
|
-
} from "./adjudicators/admissionRequest";
|
|
21
|
-
import {
|
|
22
|
-
definedEvent,
|
|
23
|
-
definedName,
|
|
24
|
-
definedGroup,
|
|
25
|
-
definedVersion,
|
|
26
|
-
definedKind,
|
|
27
|
-
definedNamespaces,
|
|
28
|
-
definedLabels,
|
|
29
|
-
definedAnnotations,
|
|
30
|
-
definedNamespaceRegexes,
|
|
31
|
-
definedNameRegex,
|
|
32
|
-
} from "./adjudicators/binding";
|
|
33
|
-
import {
|
|
34
|
-
carriedName,
|
|
35
|
-
carriedNamespace,
|
|
36
|
-
carriedLabels,
|
|
37
|
-
carriedAnnotations,
|
|
38
|
-
} from "./adjudicators/kubernetesObject";
|
|
39
|
-
import {
|
|
40
|
-
mismatchedDeletionTimestamp,
|
|
41
|
-
mismatchedEvent,
|
|
42
|
-
mismatchedName,
|
|
43
|
-
mismatchedGroup,
|
|
44
|
-
mismatchedVersion,
|
|
45
|
-
mismatchedKind,
|
|
46
|
-
mismatchedNamespace,
|
|
47
|
-
mismatchedLabels,
|
|
48
|
-
mismatchedAnnotations,
|
|
49
|
-
mismatchedNamespaceRegex,
|
|
50
|
-
mismatchedNameRegex,
|
|
51
|
-
} from "./adjudicators/mismatch";
|
|
52
7
|
import { AdmissionRequest } from "../common-types";
|
|
8
|
+
import {
|
|
9
|
+
adjudicateMisboundDeleteWithDeletionTimestamp,
|
|
10
|
+
adjudicateMismatchedDeletionTimestamp,
|
|
11
|
+
adjudicateMismatchedEvent,
|
|
12
|
+
adjudicateMismatchedName,
|
|
13
|
+
adjudicateMismatchedGroup,
|
|
14
|
+
adjudicateMismatchedVersion,
|
|
15
|
+
adjudicateMismatchedKind,
|
|
16
|
+
adjudicateUnbindableNamespaces,
|
|
17
|
+
adjudicateUncarryableNamespace,
|
|
18
|
+
adjudicateMismatchedNamespace,
|
|
19
|
+
adjudicateMismatchedLabels,
|
|
20
|
+
adjudicateMismatchedAnnotations,
|
|
21
|
+
adjudicateMismatchedNamespaceRegex,
|
|
22
|
+
adjudicateMismatchedNameRegex,
|
|
23
|
+
adjudicateCarriesIgnoredNamespace,
|
|
24
|
+
adjudicateMissingCarriableNamespace,
|
|
25
|
+
adjudicateMisboundNamespace,
|
|
26
|
+
} from "./adjudication";
|
|
53
27
|
|
|
54
|
-
type AdjudicationResult = string | null;
|
|
55
28
|
type Adjudicator = () => AdjudicationResult;
|
|
56
29
|
|
|
57
30
|
/**
|
|
@@ -142,150 +115,3 @@ export function filterNoMatchReason(
|
|
|
142
115
|
|
|
143
116
|
return "";
|
|
144
117
|
}
|
|
145
|
-
|
|
146
|
-
export function adjudicateMisboundNamespace(binding: Binding): AdjudicationResult {
|
|
147
|
-
return misboundNamespace(binding) ? "Cannot use namespace filter on a namespace object." : null;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
export function adjudicateMisboundDeleteWithDeletionTimestamp(
|
|
151
|
-
binding: Binding,
|
|
152
|
-
): AdjudicationResult {
|
|
153
|
-
return misboundDeleteWithDeletionTimestamp(binding)
|
|
154
|
-
? "Cannot use deletionTimestamp filter on a DELETE operation."
|
|
155
|
-
: null;
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
export function adjudicateMismatchedDeletionTimestamp(
|
|
159
|
-
binding: Binding,
|
|
160
|
-
obj: KubernetesObject,
|
|
161
|
-
): AdjudicationResult {
|
|
162
|
-
return mismatchedDeletionTimestamp(binding, obj)
|
|
163
|
-
? "Binding defines deletionTimestamp but Object does not carry it."
|
|
164
|
-
: null;
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
export function adjudicateMismatchedEvent(
|
|
168
|
-
binding: Binding,
|
|
169
|
-
req: AdmissionRequest,
|
|
170
|
-
): AdjudicationResult {
|
|
171
|
-
return mismatchedEvent(binding, req)
|
|
172
|
-
? `Binding defines event '${definedEvent(binding)}' but Request declares '${declaredOperation(req)}'.`
|
|
173
|
-
: null;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
export function adjudicateMismatchedName(
|
|
177
|
-
binding: Binding,
|
|
178
|
-
obj: KubernetesObject,
|
|
179
|
-
): AdjudicationResult {
|
|
180
|
-
return mismatchedName(binding, obj)
|
|
181
|
-
? `Binding defines name '${definedName(binding)}' but Object carries '${carriedName(obj)}'.`
|
|
182
|
-
: null;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
export function adjudicateMismatchedGroup(
|
|
186
|
-
binding: Binding,
|
|
187
|
-
req: AdmissionRequest,
|
|
188
|
-
): AdjudicationResult {
|
|
189
|
-
return mismatchedGroup(binding, req)
|
|
190
|
-
? `Binding defines group '${definedGroup(binding)}' but Request declares '${declaredGroup(req)}'.`
|
|
191
|
-
: null;
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
export function adjudicateMismatchedVersion(
|
|
195
|
-
binding: Binding,
|
|
196
|
-
req: AdmissionRequest,
|
|
197
|
-
): AdjudicationResult {
|
|
198
|
-
return mismatchedVersion(binding, req)
|
|
199
|
-
? `Binding defines version '${definedVersion(binding)}' but Request declares '${declaredVersion(req)}'.`
|
|
200
|
-
: null;
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
export function adjudicateMismatchedKind(
|
|
204
|
-
binding: Binding,
|
|
205
|
-
req: AdmissionRequest,
|
|
206
|
-
): AdjudicationResult {
|
|
207
|
-
return mismatchedKind(binding, req)
|
|
208
|
-
? `Binding defines kind '${definedKind(binding)}' but Request declares '${declaredKind(req)}'.`
|
|
209
|
-
: null;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
export function adjudicateUnbindableNamespaces(
|
|
213
|
-
capabilityNamespaces: string[],
|
|
214
|
-
binding: Binding,
|
|
215
|
-
): AdjudicationResult {
|
|
216
|
-
return unbindableNamespaces(capabilityNamespaces, binding)
|
|
217
|
-
? `Binding defines namespaces ${JSON.stringify(definedNamespaces(binding))} but namespaces allowed by Capability are '${JSON.stringify(capabilityNamespaces)}'.`
|
|
218
|
-
: null;
|
|
219
|
-
}
|
|
220
|
-
|
|
221
|
-
export function adjudicateUncarryableNamespace(
|
|
222
|
-
capabilityNamespaces: string[],
|
|
223
|
-
obj: KubernetesObject,
|
|
224
|
-
): AdjudicationResult {
|
|
225
|
-
return uncarryableNamespace(capabilityNamespaces, obj)
|
|
226
|
-
? `Object carries namespace '${obj.kind && obj.kind === "Namespace" ? obj.metadata?.name : carriedNamespace(obj)}' but namespaces allowed by Capability are '${JSON.stringify(capabilityNamespaces)}'.`
|
|
227
|
-
: null;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export function adjudicateMismatchedNamespace(
|
|
231
|
-
binding: Binding,
|
|
232
|
-
obj: KubernetesObject,
|
|
233
|
-
): AdjudicationResult {
|
|
234
|
-
return mismatchedNamespace(binding, obj)
|
|
235
|
-
? `Binding defines namespaces '${JSON.stringify(definedNamespaces(binding))}' but Object carries '${carriedNamespace(obj)}'.`
|
|
236
|
-
: null;
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
export function adjudicateMismatchedLabels(
|
|
240
|
-
binding: Binding,
|
|
241
|
-
obj: KubernetesObject,
|
|
242
|
-
): AdjudicationResult {
|
|
243
|
-
return mismatchedLabels(binding, obj)
|
|
244
|
-
? `Binding defines labels '${JSON.stringify(definedLabels(binding))}' but Object carries '${JSON.stringify(carriedLabels(obj))}'.`
|
|
245
|
-
: null;
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
export function adjudicateMismatchedAnnotations(
|
|
249
|
-
binding: Binding,
|
|
250
|
-
obj: KubernetesObject,
|
|
251
|
-
): AdjudicationResult {
|
|
252
|
-
return mismatchedAnnotations(binding, obj)
|
|
253
|
-
? `Binding defines annotations '${JSON.stringify(definedAnnotations(binding))}' but Object carries '${JSON.stringify(carriedAnnotations(obj))}'.`
|
|
254
|
-
: null;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
export function adjudicateMismatchedNamespaceRegex(
|
|
258
|
-
binding: Binding,
|
|
259
|
-
obj: KubernetesObject,
|
|
260
|
-
): AdjudicationResult {
|
|
261
|
-
return mismatchedNamespaceRegex(binding, obj)
|
|
262
|
-
? `Binding defines namespace regexes '${JSON.stringify(definedNamespaceRegexes(binding))}' but Object carries '${carriedNamespace(obj)}'.`
|
|
263
|
-
: null;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
export function adjudicateMismatchedNameRegex(
|
|
267
|
-
binding: Binding,
|
|
268
|
-
obj: KubernetesObject,
|
|
269
|
-
): AdjudicationResult {
|
|
270
|
-
return mismatchedNameRegex(binding, obj)
|
|
271
|
-
? `Binding defines name regex '${definedNameRegex(binding)}' but Object carries '${carriedName(obj)}'.`
|
|
272
|
-
: null;
|
|
273
|
-
}
|
|
274
|
-
|
|
275
|
-
export function adjudicateCarriesIgnoredNamespace(
|
|
276
|
-
ignoredNamespaces: string[] | undefined,
|
|
277
|
-
obj: KubernetesObject,
|
|
278
|
-
): AdjudicationResult {
|
|
279
|
-
return carriesIgnoredNamespace(ignoredNamespaces, obj)
|
|
280
|
-
? `Object carries namespace '${obj.kind && obj.kind === "Namespace" ? obj.metadata?.name : carriedNamespace(obj)}' but ignored namespaces include '${JSON.stringify(ignoredNamespaces)}'.`
|
|
281
|
-
: null;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
export function adjudicateMissingCarriableNamespace(
|
|
285
|
-
capabilityNamespaces: string[],
|
|
286
|
-
obj: KubernetesObject,
|
|
287
|
-
): AdjudicationResult {
|
|
288
|
-
return missingCarriableNamespace(capabilityNamespaces, obj)
|
|
289
|
-
? `Object does not carry a namespace but namespaces allowed by Capability are '${JSON.stringify(capabilityNamespaces)}'.`
|
|
290
|
-
: null;
|
|
291
|
-
}
|
package/src/lib/types.ts
CHANGED
|
@@ -308,3 +308,4 @@ export type PeprModuleOptions = {
|
|
|
308
308
|
/** A user-defined callback to post-process or intercept a Pepr response just before it is returned to K8s */
|
|
309
309
|
afterHook?: (res: MutateResponse | ValidateResponse) => void;
|
|
310
310
|
}; // Track if this is a watch mode controller
|
|
311
|
+
export type AdjudicationResult = string | null;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"uid": "2ac28f03-c045-4af6-86f1-aa0007571863",
|
|
3
|
-
"kind": {
|
|
4
|
-
"group": "rbac.authorization.k8s.io",
|
|
5
|
-
"version": "v1",
|
|
6
|
-
"kind": "ClusterRole"
|
|
7
|
-
},
|
|
8
|
-
"resource": {
|
|
9
|
-
"group": "rbac.authorization.k8s.io",
|
|
10
|
-
"version": "v1",
|
|
11
|
-
"resource": "clusterroles"
|
|
12
|
-
},
|
|
13
|
-
"requestKind": {
|
|
14
|
-
"group": "rbac.authorization.k8s.io",
|
|
15
|
-
"version": "v1",
|
|
16
|
-
"kind": "ClusterRole"
|
|
17
|
-
},
|
|
18
|
-
"requestResource": {
|
|
19
|
-
"group": "rbac.authorization.k8s.io",
|
|
20
|
-
"version": "v1",
|
|
21
|
-
"resource": "clusterroles"
|
|
22
|
-
},
|
|
23
|
-
"name": "pod-creator",
|
|
24
|
-
"operation": "CREATE",
|
|
25
|
-
"userInfo": {
|
|
26
|
-
"username": "system:admin",
|
|
27
|
-
"groups": ["system:masters", "system:authenticated"]
|
|
28
|
-
},
|
|
29
|
-
"object": {
|
|
30
|
-
"kind": "ClusterRole",
|
|
31
|
-
"apiVersion": "rbac.authorization.k8s.io/v1",
|
|
32
|
-
"metadata": {
|
|
33
|
-
"name": "pod-creator",
|
|
34
|
-
"creationTimestamp": null
|
|
35
|
-
},
|
|
36
|
-
"rules": [
|
|
37
|
-
{
|
|
38
|
-
"verbs": ["create", "update", "patch"],
|
|
39
|
-
"apiGroups": [""],
|
|
40
|
-
"resources": ["pods"]
|
|
41
|
-
}
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
"oldObject": null,
|
|
45
|
-
"dryRun": false,
|
|
46
|
-
"options": {
|
|
47
|
-
"kind": "CreateOptions",
|
|
48
|
-
"apiVersion": "meta.k8s.io/v1",
|
|
49
|
-
"fieldManager": "kubectl-create",
|
|
50
|
-
"fieldValidation": "Strict"
|
|
51
|
-
}
|
|
52
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"uid": "501f5447-a028-4a3f-b4ac-fc56f3f78ffc",
|
|
3
|
-
"kind": {
|
|
4
|
-
"group": "apps",
|
|
5
|
-
"version": "v1",
|
|
6
|
-
"kind": "Deployment"
|
|
7
|
-
},
|
|
8
|
-
"resource": {
|
|
9
|
-
"group": "apps",
|
|
10
|
-
"version": "v1",
|
|
11
|
-
"resource": "deployments"
|
|
12
|
-
},
|
|
13
|
-
"requestKind": {
|
|
14
|
-
"group": "apps",
|
|
15
|
-
"version": "v1",
|
|
16
|
-
"kind": "Deployment"
|
|
17
|
-
},
|
|
18
|
-
"requestResource": {
|
|
19
|
-
"group": "apps",
|
|
20
|
-
"version": "v1",
|
|
21
|
-
"resource": "deployments"
|
|
22
|
-
},
|
|
23
|
-
"name": "lower",
|
|
24
|
-
"namespace": "pepr-demo",
|
|
25
|
-
"operation": "CREATE",
|
|
26
|
-
"userInfo": {
|
|
27
|
-
"username": "system:admin",
|
|
28
|
-
"groups": ["system:masters", "system:authenticated"]
|
|
29
|
-
},
|
|
30
|
-
"object": {
|
|
31
|
-
"kind": "Deployment",
|
|
32
|
-
"apiVersion": "apps/v1",
|
|
33
|
-
"metadata": {
|
|
34
|
-
"name": "lower",
|
|
35
|
-
"namespace": "pepr-demo",
|
|
36
|
-
"creationTimestamp": null,
|
|
37
|
-
"labels": {
|
|
38
|
-
"app": "lower"
|
|
39
|
-
}
|
|
40
|
-
},
|
|
41
|
-
"spec": {
|
|
42
|
-
"replicas": 3,
|
|
43
|
-
"selector": {
|
|
44
|
-
"matchLabels": {
|
|
45
|
-
"app": "lower"
|
|
46
|
-
}
|
|
47
|
-
},
|
|
48
|
-
"template": {
|
|
49
|
-
"metadata": {
|
|
50
|
-
"creationTimestamp": null,
|
|
51
|
-
"labels": {
|
|
52
|
-
"app": "lower"
|
|
53
|
-
}
|
|
54
|
-
},
|
|
55
|
-
"spec": {
|
|
56
|
-
"containers": [
|
|
57
|
-
{
|
|
58
|
-
"name": "nginx",
|
|
59
|
-
"image": "nginx",
|
|
60
|
-
"resources": {},
|
|
61
|
-
"terminationMessagePath": "/dev/termination-log",
|
|
62
|
-
"terminationMessagePolicy": "File",
|
|
63
|
-
"imagePullPolicy": "Always"
|
|
64
|
-
}
|
|
65
|
-
],
|
|
66
|
-
"restartPolicy": "Always",
|
|
67
|
-
"terminationGracePeriodSeconds": 30,
|
|
68
|
-
"dnsPolicy": "ClusterFirst",
|
|
69
|
-
"securityContext": {},
|
|
70
|
-
"schedulerName": "default-scheduler"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"strategy": {
|
|
74
|
-
"type": "RollingUpdate",
|
|
75
|
-
"rollingUpdate": {
|
|
76
|
-
"maxUnavailable": "25%",
|
|
77
|
-
"maxSurge": "25%"
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
"revisionHistoryLimit": 10,
|
|
81
|
-
"progressDeadlineSeconds": 600
|
|
82
|
-
},
|
|
83
|
-
"status": {}
|
|
84
|
-
},
|
|
85
|
-
"oldObject": null,
|
|
86
|
-
"dryRun": false,
|
|
87
|
-
"options": {
|
|
88
|
-
"kind": "CreateOptions",
|
|
89
|
-
"apiVersion": "meta.k8s.io/v1",
|
|
90
|
-
"fieldManager": "kubectl-create",
|
|
91
|
-
"fieldValidation": "Strict"
|
|
92
|
-
}
|
|
93
|
-
}
|
|
@@ -1,272 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"uid": "af5c3d45-72b8-11eb-a3a3-0242ac130003",
|
|
3
|
-
"kind": {
|
|
4
|
-
"group": "",
|
|
5
|
-
"version": "v1",
|
|
6
|
-
"kind": "Pod"
|
|
7
|
-
},
|
|
8
|
-
"resource": {
|
|
9
|
-
"group": "",
|
|
10
|
-
"version": "v1",
|
|
11
|
-
"resource": "pods"
|
|
12
|
-
},
|
|
13
|
-
"subResource": "",
|
|
14
|
-
"name": "podinfo",
|
|
15
|
-
"namespace": "default",
|
|
16
|
-
"operation": "CREATE",
|
|
17
|
-
"userInfo": {
|
|
18
|
-
"username": "system:serviceaccount:kube-system:replicaset-controller",
|
|
19
|
-
"uid": "95c8f0ca-d31a-4d3f-9f27-9a2a2661ab3c",
|
|
20
|
-
"groups": [
|
|
21
|
-
"system:serviceaccounts",
|
|
22
|
-
"system:serviceaccounts:kube-system",
|
|
23
|
-
"system:authenticated"
|
|
24
|
-
]
|
|
25
|
-
},
|
|
26
|
-
"oldObject": {},
|
|
27
|
-
"dryRun": false,
|
|
28
|
-
"options": null,
|
|
29
|
-
"object": {
|
|
30
|
-
"apiVersion": "v1",
|
|
31
|
-
"kind": "Pod",
|
|
32
|
-
"metadata": {
|
|
33
|
-
"annotations": {
|
|
34
|
-
"prometheus.io/port": "9898",
|
|
35
|
-
"prometheus.io/scrape": "true"
|
|
36
|
-
},
|
|
37
|
-
"creationTimestamp": "2023-03-07T07:48:13Z",
|
|
38
|
-
"generateName": "cool-name-podinfo-66bbff7cf4-",
|
|
39
|
-
"labels": {
|
|
40
|
-
"app.kubernetes.io/name": "cool-name-podinfo",
|
|
41
|
-
"pod-template-hash": "66bbff7cf4",
|
|
42
|
-
"zarf-agent": "patched",
|
|
43
|
-
"test-op": "create"
|
|
44
|
-
},
|
|
45
|
-
"name": "cool-name-podinfo-66bbff7cf4-fwhl2",
|
|
46
|
-
"namespace": "helm-releasename",
|
|
47
|
-
"ownerReferences": [
|
|
48
|
-
{
|
|
49
|
-
"apiVersion": "apps/v1",
|
|
50
|
-
"blockOwnerDeletion": true,
|
|
51
|
-
"controller": true,
|
|
52
|
-
"kind": "ReplicaSet",
|
|
53
|
-
"name": "cool-name-podinfo-66bbff7cf4",
|
|
54
|
-
"uid": "41d30484-6ccd-462b-b96a-e166095e3681"
|
|
55
|
-
}
|
|
56
|
-
],
|
|
57
|
-
"resourceVersion": "46512",
|
|
58
|
-
"uid": "883303bc-e4b7-4fa8-a576-575cc4407201"
|
|
59
|
-
},
|
|
60
|
-
"spec": {
|
|
61
|
-
"containers": [
|
|
62
|
-
{
|
|
63
|
-
"command": [
|
|
64
|
-
"./podinfo",
|
|
65
|
-
"--port=9898",
|
|
66
|
-
"--cert-path=/data/cert",
|
|
67
|
-
"--port-metrics=9797",
|
|
68
|
-
"--grpc-port=9999",
|
|
69
|
-
"--grpc-service-name=podinfo",
|
|
70
|
-
"--level=info",
|
|
71
|
-
"--random-delay=false",
|
|
72
|
-
"--random-error=false"
|
|
73
|
-
],
|
|
74
|
-
"env": [
|
|
75
|
-
{
|
|
76
|
-
"name": "PODINFO_UI_COLOR",
|
|
77
|
-
"value": "#34577c"
|
|
78
|
-
}
|
|
79
|
-
],
|
|
80
|
-
"image": "127.0.0.1:31999/stefanprodan/podinfo-2985051089:6.1.6",
|
|
81
|
-
"imagePullPolicy": "IfNotPresent",
|
|
82
|
-
"livenessProbe": {
|
|
83
|
-
"exec": {
|
|
84
|
-
"command": ["podcli", "check", "http", "localhost:9898/healthz"]
|
|
85
|
-
},
|
|
86
|
-
"failureThreshold": 3,
|
|
87
|
-
"initialDelaySeconds": 1,
|
|
88
|
-
"periodSeconds": 10,
|
|
89
|
-
"successThreshold": 1,
|
|
90
|
-
"timeoutSeconds": 5
|
|
91
|
-
},
|
|
92
|
-
"name": "podinfo",
|
|
93
|
-
"ports": [
|
|
94
|
-
{
|
|
95
|
-
"containerPort": 9898,
|
|
96
|
-
"name": "http",
|
|
97
|
-
"protocol": "TCP"
|
|
98
|
-
},
|
|
99
|
-
{
|
|
100
|
-
"containerPort": 9797,
|
|
101
|
-
"name": "http-metrics",
|
|
102
|
-
"protocol": "TCP"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"containerPort": 9999,
|
|
106
|
-
"name": "grpc",
|
|
107
|
-
"protocol": "TCP"
|
|
108
|
-
}
|
|
109
|
-
],
|
|
110
|
-
"readinessProbe": {
|
|
111
|
-
"exec": {
|
|
112
|
-
"command": ["podcli", "check", "http", "localhost:9898/readyz"]
|
|
113
|
-
},
|
|
114
|
-
"failureThreshold": 3,
|
|
115
|
-
"initialDelaySeconds": 1,
|
|
116
|
-
"periodSeconds": 10,
|
|
117
|
-
"successThreshold": 1,
|
|
118
|
-
"timeoutSeconds": 5
|
|
119
|
-
},
|
|
120
|
-
"resources": {
|
|
121
|
-
"requests": {
|
|
122
|
-
"cpu": "1m",
|
|
123
|
-
"memory": "16Mi"
|
|
124
|
-
}
|
|
125
|
-
},
|
|
126
|
-
"terminationMessagePath": "/dev/termination-log",
|
|
127
|
-
"terminationMessagePolicy": "File",
|
|
128
|
-
"volumeMounts": [
|
|
129
|
-
{
|
|
130
|
-
"mountPath": "/data",
|
|
131
|
-
"name": "data"
|
|
132
|
-
},
|
|
133
|
-
{
|
|
134
|
-
"mountPath": "/var/run/secrets/kubernetes.io/serviceaccount",
|
|
135
|
-
"name": "kube-api-access-vn9dc",
|
|
136
|
-
"readOnly": true
|
|
137
|
-
}
|
|
138
|
-
]
|
|
139
|
-
}
|
|
140
|
-
],
|
|
141
|
-
"dnsPolicy": "ClusterFirst",
|
|
142
|
-
"enableServiceLinks": true,
|
|
143
|
-
"imagePullSecrets": [
|
|
144
|
-
{
|
|
145
|
-
"name": "private-registry"
|
|
146
|
-
}
|
|
147
|
-
],
|
|
148
|
-
"nodeName": "k3d-k3s-default-server-0",
|
|
149
|
-
"preemptionPolicy": "PreemptLowerPriority",
|
|
150
|
-
"priority": 0,
|
|
151
|
-
"restartPolicy": "Always",
|
|
152
|
-
"schedulerName": "default-scheduler",
|
|
153
|
-
"securityContext": {},
|
|
154
|
-
"serviceAccount": "default",
|
|
155
|
-
"serviceAccountName": "default",
|
|
156
|
-
"terminationGracePeriodSeconds": 30,
|
|
157
|
-
"tolerations": [
|
|
158
|
-
{
|
|
159
|
-
"effect": "NoExecute",
|
|
160
|
-
"key": "node.kubernetes.io/not-ready",
|
|
161
|
-
"operator": "Exists",
|
|
162
|
-
"tolerationSeconds": 300
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
"effect": "NoExecute",
|
|
166
|
-
"key": "node.kubernetes.io/unreachable",
|
|
167
|
-
"operator": "Exists",
|
|
168
|
-
"tolerationSeconds": 300
|
|
169
|
-
}
|
|
170
|
-
],
|
|
171
|
-
"volumes": [
|
|
172
|
-
{
|
|
173
|
-
"emptyDir": {},
|
|
174
|
-
"name": "data"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"name": "kube-api-access-vn9dc",
|
|
178
|
-
"projected": {
|
|
179
|
-
"defaultMode": 420,
|
|
180
|
-
"sources": [
|
|
181
|
-
{
|
|
182
|
-
"serviceAccountToken": {
|
|
183
|
-
"expirationSeconds": 3607,
|
|
184
|
-
"path": "token"
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"configMap": {
|
|
189
|
-
"items": [
|
|
190
|
-
{
|
|
191
|
-
"key": "ca.crt",
|
|
192
|
-
"path": "ca.crt"
|
|
193
|
-
}
|
|
194
|
-
],
|
|
195
|
-
"name": "kube-root-ca.crt"
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
"downwardAPI": {
|
|
200
|
-
"items": [
|
|
201
|
-
{
|
|
202
|
-
"fieldRef": {
|
|
203
|
-
"apiVersion": "v1",
|
|
204
|
-
"fieldPath": "metadata.namespace"
|
|
205
|
-
},
|
|
206
|
-
"path": "namespace"
|
|
207
|
-
}
|
|
208
|
-
]
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
]
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
]
|
|
215
|
-
},
|
|
216
|
-
"status": {
|
|
217
|
-
"conditions": [
|
|
218
|
-
{
|
|
219
|
-
"lastProbeTime": null,
|
|
220
|
-
"lastTransitionTime": "2023-03-07T07:48:13Z",
|
|
221
|
-
"status": "True",
|
|
222
|
-
"type": "Initialized"
|
|
223
|
-
},
|
|
224
|
-
{
|
|
225
|
-
"lastProbeTime": null,
|
|
226
|
-
"lastTransitionTime": "2023-03-07T07:48:16Z",
|
|
227
|
-
"status": "True",
|
|
228
|
-
"type": "Ready"
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
"lastProbeTime": null,
|
|
232
|
-
"lastTransitionTime": "2023-03-07T07:48:16Z",
|
|
233
|
-
"status": "True",
|
|
234
|
-
"type": "ContainersReady"
|
|
235
|
-
},
|
|
236
|
-
{
|
|
237
|
-
"lastProbeTime": null,
|
|
238
|
-
"lastTransitionTime": "2023-03-07T07:48:13Z",
|
|
239
|
-
"status": "True",
|
|
240
|
-
"type": "PodScheduled"
|
|
241
|
-
}
|
|
242
|
-
],
|
|
243
|
-
"containerStatuses": [
|
|
244
|
-
{
|
|
245
|
-
"containerID": "containerd://81b20dafbf2498a52c8ab46fa1e95ce25c06271684e590a377ee4ac9fd2a85ee",
|
|
246
|
-
"image": "127.0.0.1:31999/stefanprodan/podinfo-2985051089:6.1.6",
|
|
247
|
-
"imageID": "127.0.0.1:31999/stefanprodan/podinfo-2985051089@sha256:1f1fb2d1bfadac8a487106ea62b2b582bedc83fe17b3332dffe9151dfc820742",
|
|
248
|
-
"lastState": {},
|
|
249
|
-
"name": "podinfo",
|
|
250
|
-
"ready": true,
|
|
251
|
-
"restartCount": 0,
|
|
252
|
-
"started": true,
|
|
253
|
-
"state": {
|
|
254
|
-
"running": {
|
|
255
|
-
"startedAt": "2023-03-07T07:48:14Z"
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
],
|
|
260
|
-
"hostIP": "172.19.0.3",
|
|
261
|
-
"phase": "Running",
|
|
262
|
-
"podIP": "10.42.0.26",
|
|
263
|
-
"podIPs": [
|
|
264
|
-
{
|
|
265
|
-
"ip": "10.42.0.26"
|
|
266
|
-
}
|
|
267
|
-
],
|
|
268
|
-
"qosClass": "Burstable",
|
|
269
|
-
"startTime": "2023-03-07T07:48:13Z"
|
|
270
|
-
}
|
|
271
|
-
}
|
|
272
|
-
}
|