1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Make typing of HelmRepo shared

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-02-14 14:19:27 +02:00
parent 0ba16a81de
commit 0d83d6b6ee
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
3 changed files with 18 additions and 2 deletions

16
src/common/helm-repo.ts Normal file
View File

@ -0,0 +1,16 @@
/**
* Copyright (c) OpenLens Authors. All rights reserved.
* Licensed under MIT License. See LICENSE in root directory for more information.
*/
// eslint-disable-next-line @typescript-eslint/consistent-type-definitions
export type HelmRepo = {
name: string;
url: string;
cacheFilePath?: string;
caFile?: string;
certFile?: string;
insecureSkipTlsVerify?: boolean;
keyFile?: string;
username?: string;
password?: string;
};

View File

@ -4,7 +4,7 @@
*/
import { sortCharts } from "../../../common/utils";
import type { HelmRepo } from "../helm-repo-manager";
import type { HelmRepo } from "../../../common/helm-repo";
const charts = new Map([
["stable", {

View File

@ -5,13 +5,13 @@
import fs from "fs";
import * as yaml from "js-yaml";
import type { HelmRepo } from "./helm-repo-manager";
import logger from "../logger";
import type { RepoHelmChartList } from "../../common/k8s-api/endpoints/helm-charts.api";
import { iter, put, sortCharts } from "../../common/utils";
import { execHelm } from "./exec";
import type { SetRequired } from "type-fest";
import { assert } from "console";
import type { HelmRepo } from "../../common/helm-repo";
interface ChartCacheEntry {
data: string; // serialized JSON