cdk8s-plus-34 0.0.1 → 2.0.0
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/.jsii +101649 -0
- package/CODE_OF_CONDUCT.md +3 -0
- package/CONTRIBUTING.md +185 -0
- package/DCO +34 -0
- package/LICENSE +202 -0
- package/NOTICE +1 -0
- package/OWNERS.md +5 -0
- package/README.md +21 -33
- package/SECURITY.md +5 -0
- package/cdk8s.yaml +11 -0
- package/docs/java.md +150009 -0
- package/docs/plus/config-map.md +98 -0
- package/docs/plus/container.md +133 -0
- package/docs/plus/cronjob.md +67 -0
- package/docs/plus/deployment.md +232 -0
- package/docs/plus/horizontal-pod-autoscaler.md +226 -0
- package/docs/plus/ingress.md +68 -0
- package/docs/plus/job.md +48 -0
- package/docs/plus/namespace.md +58 -0
- package/docs/plus/network-policy.md +341 -0
- package/docs/plus/pod.md +455 -0
- package/docs/plus/pv.md +82 -0
- package/docs/plus/pvc.md +77 -0
- package/docs/plus/rbac.md +104 -0
- package/docs/plus/secret.md +32 -0
- package/docs/plus/service-account.md +35 -0
- package/docs/plus/service.md +41 -0
- package/docs/plus/volume.md +84 -0
- package/docs/python.md +161196 -0
- package/docs/typescript.md +139649 -0
- package/git-hooks/README.md +9 -0
- package/git-hooks/prepare-commit-msg +18 -0
- package/git-hooks/setup.sh +10 -0
- package/lib/_action.d.ts +26 -0
- package/lib/_action.js +39 -0
- package/lib/api-resource.d.ts +298 -0
- package/lib/api-resource.js +430 -0
- package/lib/base.d.ts +79 -0
- package/lib/base.js +92 -0
- package/lib/config-map.d.ts +126 -0
- package/lib/config-map.js +159 -0
- package/lib/container.d.ts +1057 -0
- package/lib/container.js +845 -0
- package/lib/cron-job.d.ts +138 -0
- package/lib/cron-job.js +103 -0
- package/lib/daemon-set.d.ts +45 -0
- package/lib/daemon-set.js +55 -0
- package/lib/deployment.d.ts +235 -0
- package/lib/deployment.js +216 -0
- package/lib/handler.d.ts +62 -0
- package/lib/handler.js +54 -0
- package/lib/horizontal-pod-autoscaler.d.ts +500 -0
- package/lib/horizontal-pod-autoscaler.js +569 -0
- package/lib/imports/k8s.d.ts +25809 -0
- package/lib/imports/k8s.js +19238 -0
- package/lib/index.d.ts +26 -0
- package/lib/index.js +44 -0
- package/lib/ingress.d.ts +230 -0
- package/lib/ingress.js +246 -0
- package/lib/job.d.ts +64 -0
- package/lib/job.js +54 -0
- package/lib/namespace.d.ts +128 -0
- package/lib/namespace.js +109 -0
- package/lib/network-policy.d.ts +311 -0
- package/lib/network-policy.js +344 -0
- package/lib/pod.d.ts +1097 -0
- package/lib/pod.js +1147 -0
- package/lib/probe.d.ts +181 -0
- package/lib/probe.js +88 -0
- package/lib/pv.d.ts +375 -0
- package/lib/pv.js +273 -0
- package/lib/pvc.d.ts +163 -0
- package/lib/pvc.js +154 -0
- package/lib/role-binding.d.ts +138 -0
- package/lib/role-binding.js +165 -0
- package/lib/role.d.ts +268 -0
- package/lib/role.js +401 -0
- package/lib/secret.d.ts +195 -0
- package/lib/secret.js +185 -0
- package/lib/service-account.d.ts +83 -0
- package/lib/service-account.js +105 -0
- package/lib/service.d.ts +289 -0
- package/lib/service.js +182 -0
- package/lib/stateful-set.d.ts +206 -0
- package/lib/stateful-set.js +244 -0
- package/lib/utils.d.ts +4 -0
- package/lib/utils.js +33 -0
- package/lib/volume.d.ts +577 -0
- package/lib/volume.js +377 -0
- package/lib/workload.d.ts +121 -0
- package/lib/workload.js +122 -0
- package/node_modules/balanced-match/.github/FUNDING.yml +2 -0
- package/node_modules/balanced-match/LICENSE.md +21 -0
- package/node_modules/balanced-match/README.md +97 -0
- package/node_modules/balanced-match/index.js +62 -0
- package/node_modules/balanced-match/package.json +48 -0
- package/node_modules/brace-expansion/.github/FUNDING.yml +2 -0
- package/node_modules/brace-expansion/LICENSE +21 -0
- package/node_modules/brace-expansion/README.md +135 -0
- package/node_modules/brace-expansion/index.js +202 -0
- package/node_modules/brace-expansion/package.json +49 -0
- package/node_modules/minimatch/LICENSE +15 -0
- package/node_modules/minimatch/README.md +491 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js +14 -0
- package/node_modules/minimatch/dist/commonjs/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/commonjs/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/ast.js +747 -0
- package/node_modules/minimatch/dist/commonjs/ast.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js +152 -0
- package/node_modules/minimatch/dist/commonjs/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/commonjs/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/escape.js +22 -0
- package/node_modules/minimatch/dist/commonjs/escape.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts +98 -0
- package/node_modules/minimatch/dist/commonjs/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/index.js +1023 -0
- package/node_modules/minimatch/dist/commonjs/index.js.map +1 -0
- package/node_modules/minimatch/dist/commonjs/package.json +3 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/commonjs/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js +24 -0
- package/node_modules/minimatch/dist/commonjs/unescape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts +2 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js +10 -0
- package/node_modules/minimatch/dist/esm/assert-valid-pattern.js.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts +20 -0
- package/node_modules/minimatch/dist/esm/ast.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/ast.js +743 -0
- package/node_modules/minimatch/dist/esm/ast.js.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts +8 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js +148 -0
- package/node_modules/minimatch/dist/esm/brace-expressions.js.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts +12 -0
- package/node_modules/minimatch/dist/esm/escape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/escape.js +18 -0
- package/node_modules/minimatch/dist/esm/escape.js.map +1 -0
- package/node_modules/minimatch/dist/esm/index.d.ts +98 -0
- package/node_modules/minimatch/dist/esm/index.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/index.js +1007 -0
- package/node_modules/minimatch/dist/esm/index.js.map +1 -0
- package/node_modules/minimatch/dist/esm/package.json +3 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts +17 -0
- package/node_modules/minimatch/dist/esm/unescape.d.ts.map +1 -0
- package/node_modules/minimatch/dist/esm/unescape.js +20 -0
- package/node_modules/minimatch/dist/esm/unescape.js.map +1 -0
- package/node_modules/minimatch/package.json +82 -0
- package/package.json +176 -6
- package/rotate.md +85 -0
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
var balanced = require('balanced-match');
|
|
2
|
+
|
|
3
|
+
module.exports = expandTop;
|
|
4
|
+
|
|
5
|
+
var escSlash = '\0SLASH'+Math.random()+'\0';
|
|
6
|
+
var escOpen = '\0OPEN'+Math.random()+'\0';
|
|
7
|
+
var escClose = '\0CLOSE'+Math.random()+'\0';
|
|
8
|
+
var escComma = '\0COMMA'+Math.random()+'\0';
|
|
9
|
+
var escPeriod = '\0PERIOD'+Math.random()+'\0';
|
|
10
|
+
|
|
11
|
+
function numeric(str) {
|
|
12
|
+
return parseInt(str, 10) == str
|
|
13
|
+
? parseInt(str, 10)
|
|
14
|
+
: str.charCodeAt(0);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function escapeBraces(str) {
|
|
18
|
+
return str.split('\\\\').join(escSlash)
|
|
19
|
+
.split('\\{').join(escOpen)
|
|
20
|
+
.split('\\}').join(escClose)
|
|
21
|
+
.split('\\,').join(escComma)
|
|
22
|
+
.split('\\.').join(escPeriod);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function unescapeBraces(str) {
|
|
26
|
+
return str.split(escSlash).join('\\')
|
|
27
|
+
.split(escOpen).join('{')
|
|
28
|
+
.split(escClose).join('}')
|
|
29
|
+
.split(escComma).join(',')
|
|
30
|
+
.split(escPeriod).join('.');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
// Basically just str.split(","), but handling cases
|
|
35
|
+
// where we have nested braced sections, which should be
|
|
36
|
+
// treated as individual members, like {a,{b,c},d}
|
|
37
|
+
function parseCommaParts(str) {
|
|
38
|
+
if (!str)
|
|
39
|
+
return [''];
|
|
40
|
+
|
|
41
|
+
var parts = [];
|
|
42
|
+
var m = balanced('{', '}', str);
|
|
43
|
+
|
|
44
|
+
if (!m)
|
|
45
|
+
return str.split(',');
|
|
46
|
+
|
|
47
|
+
var pre = m.pre;
|
|
48
|
+
var body = m.body;
|
|
49
|
+
var post = m.post;
|
|
50
|
+
var p = pre.split(',');
|
|
51
|
+
|
|
52
|
+
p[p.length-1] += '{' + body + '}';
|
|
53
|
+
var postParts = parseCommaParts(post);
|
|
54
|
+
if (post.length) {
|
|
55
|
+
p[p.length-1] += postParts.shift();
|
|
56
|
+
p.push.apply(p, postParts);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
parts.push.apply(parts, p);
|
|
60
|
+
|
|
61
|
+
return parts;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
function expandTop(str) {
|
|
65
|
+
if (!str)
|
|
66
|
+
return [];
|
|
67
|
+
|
|
68
|
+
// I don't know why Bash 4.3 does this, but it does.
|
|
69
|
+
// Anything starting with {} will have the first two bytes preserved
|
|
70
|
+
// but *only* at the top level, so {},a}b will not expand to anything,
|
|
71
|
+
// but a{},b}c will be expanded to [a}c,abc].
|
|
72
|
+
// One could argue that this is a bug in Bash, but since the goal of
|
|
73
|
+
// this module is to match Bash's rules, we escape a leading {}
|
|
74
|
+
if (str.substr(0, 2) === '{}') {
|
|
75
|
+
str = '\\{\\}' + str.substr(2);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
return expand(escapeBraces(str), true).map(unescapeBraces);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function embrace(str) {
|
|
82
|
+
return '{' + str + '}';
|
|
83
|
+
}
|
|
84
|
+
function isPadded(el) {
|
|
85
|
+
return /^-?0\d/.test(el);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
function lte(i, y) {
|
|
89
|
+
return i <= y;
|
|
90
|
+
}
|
|
91
|
+
function gte(i, y) {
|
|
92
|
+
return i >= y;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
function expand(str, isTop) {
|
|
96
|
+
var expansions = [];
|
|
97
|
+
|
|
98
|
+
var m = balanced('{', '}', str);
|
|
99
|
+
if (!m) return [str];
|
|
100
|
+
|
|
101
|
+
// no need to expand pre, since it is guaranteed to be free of brace-sets
|
|
102
|
+
var pre = m.pre;
|
|
103
|
+
var post = m.post.length
|
|
104
|
+
? expand(m.post, false)
|
|
105
|
+
: [''];
|
|
106
|
+
|
|
107
|
+
if (/\$$/.test(m.pre)) {
|
|
108
|
+
for (var k = 0; k < post.length; k++) {
|
|
109
|
+
var expansion = pre+ '{' + m.body + '}' + post[k];
|
|
110
|
+
expansions.push(expansion);
|
|
111
|
+
}
|
|
112
|
+
} else {
|
|
113
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
114
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
115
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
116
|
+
var isOptions = m.body.indexOf(',') >= 0;
|
|
117
|
+
if (!isSequence && !isOptions) {
|
|
118
|
+
// {a},b}
|
|
119
|
+
if (m.post.match(/,(?!,).*\}/)) {
|
|
120
|
+
str = m.pre + '{' + m.body + escClose + m.post;
|
|
121
|
+
return expand(str);
|
|
122
|
+
}
|
|
123
|
+
return [str];
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
var n;
|
|
127
|
+
if (isSequence) {
|
|
128
|
+
n = m.body.split(/\.\./);
|
|
129
|
+
} else {
|
|
130
|
+
n = parseCommaParts(m.body);
|
|
131
|
+
if (n.length === 1) {
|
|
132
|
+
// x{{a,b}}y ==> x{a}y x{b}y
|
|
133
|
+
n = expand(n[0], false).map(embrace);
|
|
134
|
+
if (n.length === 1) {
|
|
135
|
+
return post.map(function(p) {
|
|
136
|
+
return m.pre + n[0] + p;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// at this point, n is the parts, and we know it's not a comma set
|
|
143
|
+
// with a single entry.
|
|
144
|
+
var N;
|
|
145
|
+
|
|
146
|
+
if (isSequence) {
|
|
147
|
+
var x = numeric(n[0]);
|
|
148
|
+
var y = numeric(n[1]);
|
|
149
|
+
var width = Math.max(n[0].length, n[1].length)
|
|
150
|
+
var incr = n.length == 3
|
|
151
|
+
? Math.max(Math.abs(numeric(n[2])), 1)
|
|
152
|
+
: 1;
|
|
153
|
+
var test = lte;
|
|
154
|
+
var reverse = y < x;
|
|
155
|
+
if (reverse) {
|
|
156
|
+
incr *= -1;
|
|
157
|
+
test = gte;
|
|
158
|
+
}
|
|
159
|
+
var pad = n.some(isPadded);
|
|
160
|
+
|
|
161
|
+
N = [];
|
|
162
|
+
|
|
163
|
+
for (var i = x; test(i, y); i += incr) {
|
|
164
|
+
var c;
|
|
165
|
+
if (isAlphaSequence) {
|
|
166
|
+
c = String.fromCharCode(i);
|
|
167
|
+
if (c === '\\')
|
|
168
|
+
c = '';
|
|
169
|
+
} else {
|
|
170
|
+
c = String(i);
|
|
171
|
+
if (pad) {
|
|
172
|
+
var need = width - c.length;
|
|
173
|
+
if (need > 0) {
|
|
174
|
+
var z = new Array(need + 1).join('0');
|
|
175
|
+
if (i < 0)
|
|
176
|
+
c = '-' + z + c.slice(1);
|
|
177
|
+
else
|
|
178
|
+
c = z + c;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
N.push(c);
|
|
183
|
+
}
|
|
184
|
+
} else {
|
|
185
|
+
N = [];
|
|
186
|
+
|
|
187
|
+
for (var j = 0; j < n.length; j++) {
|
|
188
|
+
N.push.apply(N, expand(n[j], false));
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
for (var j = 0; j < N.length; j++) {
|
|
193
|
+
for (var k = 0; k < post.length; k++) {
|
|
194
|
+
var expansion = pre + N[j] + post[k];
|
|
195
|
+
if (!isTop || isSequence || expansion)
|
|
196
|
+
expansions.push(expansion);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
return expansions;
|
|
202
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "brace-expansion",
|
|
3
|
+
"description": "Brace expansion as known from sh/bash",
|
|
4
|
+
"version": "2.0.3",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git://github.com/juliangruber/brace-expansion.git"
|
|
8
|
+
},
|
|
9
|
+
"homepage": "https://github.com/juliangruber/brace-expansion",
|
|
10
|
+
"main": "index.js",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "tape test/*.js",
|
|
13
|
+
"gentest": "bash test/generate.sh",
|
|
14
|
+
"bench": "matcha test/perf/bench.js"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"balanced-match": "^1.0.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@c4312/matcha": "^1.3.1",
|
|
21
|
+
"tape": "^4.6.0"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [],
|
|
24
|
+
"author": {
|
|
25
|
+
"name": "Julian Gruber",
|
|
26
|
+
"email": "mail@juliangruber.com",
|
|
27
|
+
"url": "http://juliangruber.com"
|
|
28
|
+
},
|
|
29
|
+
"license": "MIT",
|
|
30
|
+
"testling": {
|
|
31
|
+
"files": "test/*.js",
|
|
32
|
+
"browsers": [
|
|
33
|
+
"ie/8..latest",
|
|
34
|
+
"firefox/20..latest",
|
|
35
|
+
"firefox/nightly",
|
|
36
|
+
"chrome/25..latest",
|
|
37
|
+
"chrome/canary",
|
|
38
|
+
"opera/12..latest",
|
|
39
|
+
"opera/next",
|
|
40
|
+
"safari/5.1..latest",
|
|
41
|
+
"ipad/6.0..latest",
|
|
42
|
+
"iphone/6.0..latest",
|
|
43
|
+
"android-browser/4.2..latest"
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
"publishConfig": {
|
|
47
|
+
"tag": "2.x"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|