Skip to content

Commit 4036958

Browse files
committed
chore(release): 0.2.4
1 parent ed7c4e0 commit 4036958

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@linode/apl-k8s-operator",
3-
"version": "0.2.3",
3+
"version": "0.2.4",
44
"description": "Build Kubernetes operators in NodeJS (and TypeScript)",
55
"repository": {
66
"type": "git",

src/operator.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ export default abstract class Operator {
188188
* @param plural The plural name of the custom resource
189189
* @param namespace Optional namespace to include in the uri
190190
*/
191-
protected getCustomResourceApiUri(group: string, version: string, plural: string, namespace?: string): string {
191+
protected getCustomResourceApiUri(version: string, plural: string, group?: string, namespace?: string): string {
192192
let path = group ? `/apis/${group}/${version}/` : `/api/${version}/`
193193
if (namespace) {
194194
path += `namespaces/${namespace}/`
@@ -275,6 +275,8 @@ export default abstract class Operator {
275275
const apiVersion = group ? `${group}/${version}` : `${version}`
276276
const id = `${plural}.${apiVersion}`
277277

278+
this.resourcePathBuilders[id] = (meta) => this.getCustomResourceApiUri(version, plural, group, meta.namespace);
279+
278280
const path = group
279281
? `/apis/${group}/${version}${namespace ? `/namespaces/${namespace}` : ''}/${plural}`
280282
: `/api/${version}${namespace ? `/namespaces/${namespace}` : ''}/${plural}`

0 commit comments

Comments
 (0)