mirror of
https://github.com/morten-olsen/homelab-operator.git
synced 2026-02-08 01:36:28 +01:00
stuff
This commit is contained in:
24
src/resources/flux/helm-repo/helm-repo.ts
Normal file
24
src/resources/flux/helm-repo/helm-repo.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import type { KubernetesObject } from '@kubernetes/client-node';
|
||||
import type { K8SHelmRepositoryV1 } from 'src/__generated__/resources/K8SHelmRepositoryV1.ts';
|
||||
|
||||
import { Resource } from '#services/resources/resources.ts';
|
||||
|
||||
type SetOptions = {
|
||||
url: string;
|
||||
};
|
||||
class HelmRepo extends Resource<KubernetesObject & K8SHelmRepositoryV1> {
|
||||
public static readonly apiVersion = 'source.toolkit.fluxcd.io/v1';
|
||||
public static readonly kind = 'HelmRepository';
|
||||
public static readonly plural = 'helmrepositories';
|
||||
|
||||
public set = async ({ url }: SetOptions) => {
|
||||
await this.ensure({
|
||||
spec: {
|
||||
interval: '1h',
|
||||
url,
|
||||
},
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export { HelmRepo };
|
||||
Reference in New Issue
Block a user