UNPKG

@catladder/cli

Version:

Panter cli tool for cloud CI/CD and DevOps

26 lines (25 loc) 754 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.commandKubeListSecrets = void 0; const defineCommand_1 = require("../../core/defineCommand"); const k8sApi_1 = require("../../k8sApi"); exports.commandKubeListSecrets = (0, defineCommand_1.defineCommand)({ name: "k8s list-secrets", description: "show secrets", group: "general", inputs: { namespace: { type: "string", message: "kubernetes namespace", positional: true } }, execute: async ctx => { const namespace = await ctx.get("namespace"); const k8sApi = (0, k8sApi_1.getk8sApi)(); const res = await k8sApi.listNamespacedSecret(namespace); ctx.log(res.body.items.map(n => n.metadata.name).join("\n")); } });