Skip to content

Commit 7f9c8b8

Browse files
authored
Various Fixes (#176)
* Update deps to use [email protected] * Regenerate init-package
1 parent 949dcdd commit 7f9c8b8

12 files changed

+216
-490
lines changed

scripts/version-kpt-functions-sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
# limitations under the License.
1515

1616
# Usage:
17-
# $ version-kpt-functinos-sdk.sh 0.13.0-rc.1
17+
# $ version-kpt-functions-sdk.sh 0.13.0-rc.1
1818

1919
set -euo pipefail
2020

ts/demo-functions/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ts/demo-functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"dependencies": {
2525
"glob": "^7.1.3",
2626
"js-yaml": "^3.14.0",
27-
"kpt-functions": "^0.14.0"
27+
"kpt-functions": "^0.14.3"
2828
},
2929
"devDependencies": {
3030
"@types/fs-extra": "^9.0.1",

ts/hello-world/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ts/hello-world/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"kpt:type-create": "kpt type-create"
1616
},
1717
"dependencies": {
18-
"kpt-functions": "^0.14.0"
18+
"kpt-functions": "^0.14.3"
1919
},
2020
"devDependencies": {
2121
"@types/jasmine": "^3.5.10",

ts/init-package/package-lock.json

Lines changed: 41 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ts/init-package/src/gen/io.k8s.api.authentication.v1.ts

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,96 @@
11
import { KubernetesObject } from 'kpt-functions';
22
import * as apisMetaV1 from './io.k8s.apimachinery.pkg.apis.meta.v1';
33

4+
// BoundObjectReference is a reference to an object that a token is bound to.
5+
export class BoundObjectReference {
6+
// API version of the referent.
7+
public apiVersion?: string;
8+
9+
// Kind of the referent. Valid kinds are 'Pod' and 'Secret'.
10+
public kind?: string;
11+
12+
// Name of the referent.
13+
public name?: string;
14+
15+
// UID of the referent.
16+
public uid?: string;
17+
}
18+
19+
// TokenRequest requests a token for a given service account.
20+
export class TokenRequest implements KubernetesObject {
21+
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
22+
public apiVersion: string;
23+
24+
// Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
25+
public kind: string;
26+
27+
public metadata: apisMetaV1.ObjectMeta;
28+
29+
public spec: TokenRequestSpec;
30+
31+
public status?: TokenRequestStatus;
32+
33+
constructor(desc: TokenRequest.Interface) {
34+
this.apiVersion = TokenRequest.apiVersion;
35+
this.kind = TokenRequest.kind;
36+
this.metadata = desc.metadata;
37+
this.spec = desc.spec;
38+
this.status = desc.status;
39+
}
40+
}
41+
42+
export function isTokenRequest(o: any): o is TokenRequest {
43+
return o && o.apiVersion === TokenRequest.apiVersion && o.kind === TokenRequest.kind;
44+
}
45+
46+
export namespace TokenRequest {
47+
export const apiVersion = "authentication.k8s.io/v1";
48+
export const group = "authentication.k8s.io";
49+
export const version = "v1";
50+
export const kind = "TokenRequest";
51+
52+
// TokenRequest requests a token for a given service account.
53+
export interface Interface {
54+
metadata: apisMetaV1.ObjectMeta;
55+
56+
spec: TokenRequestSpec;
57+
58+
status?: TokenRequestStatus;
59+
}
60+
}
61+
62+
// TokenRequestSpec contains client provided parameters of a token request.
63+
export class TokenRequestSpec {
64+
// Audiences are the intendend audiences of the token. A recipient of a token must identitfy themself with an identifier in the list of audiences of the token, and otherwise should reject the token. A token issued for multiple audiences may be used to authenticate against any of the audiences listed but implies a high degree of trust between the target audiences.
65+
public audiences: string[];
66+
67+
// BoundObjectRef is a reference to an object that the token will be bound to. The token will only be valid for as long as the bound object exists. NOTE: The API server's TokenReview endpoint will validate the BoundObjectRef, but other audiences may not. Keep ExpirationSeconds small if you want prompt revocation.
68+
public boundObjectRef?: BoundObjectReference;
69+
70+
// ExpirationSeconds is the requested duration of validity of the request. The token issuer may return a token with a different validity duration so a client needs to check the 'expiration' field in a response.
71+
public expirationSeconds?: number;
72+
73+
constructor(desc: TokenRequestSpec) {
74+
this.audiences = desc.audiences;
75+
this.boundObjectRef = desc.boundObjectRef;
76+
this.expirationSeconds = desc.expirationSeconds;
77+
}
78+
}
79+
80+
// TokenRequestStatus is the result of a token request.
81+
export class TokenRequestStatus {
82+
// ExpirationTimestamp is the time of expiration of the returned token.
83+
public expirationTimestamp: apisMetaV1.Time;
84+
85+
// Token is the opaque bearer token.
86+
public token: string;
87+
88+
constructor(desc: TokenRequestStatus) {
89+
this.expirationTimestamp = desc.expirationTimestamp;
90+
this.token = desc.token;
91+
}
92+
}
93+
494
// TokenReview attempts to authenticate a token to a known user. Note: TokenReview requests may be cached by the webhook token authenticator plugin in the kube-apiserver.
595
export class TokenReview implements KubernetesObject {
696
// APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources

0 commit comments

Comments
 (0)