sparse-intern-71089
03/11/2022, 5:56 PMbillowy-army-68599
pulumi-command
provider: https://www.pulumi.com/registry/packages/command/api-docs/local/
https://www.pulumi.com/registry/packages/command/#graceful-cleanup-of-workloads-in-a-kubernetes-clusterbillowy-army-68599
kubectl
on stdout, you can easily convert that to pulumi as well?billowy-army-68599
freezing-umbrella-80278
03/11/2022, 7:45 PMlocal.Command
.
Thanks for that example usage with kubectl
.billowy-army-68599
freezing-umbrella-80278
03/11/2022, 8:00 PMfreezing-umbrella-80278
03/11/2022, 8:39 PMconst agentToken = config.requireSecret("gitlab-agent-token");
const gitlabAgentContainer = new docker.Container("gitlab-agent-container", {
image:
"<http://registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/cli:stable|registry.gitlab.com/gitlab-org/cluster-integration/gitlab-agent/cli:stable>",
rm: true,
command: [
"generate",
`--agent-token=${agentToken}`,
"--kas-address=<wss://kas.gitlab.com>",
"--agent-version stable",
"--namespace gitlab-kubernetes-agent",
],
});
module.exports = {
logs: gitlabAgentContainer.containerLogs,
};
freezing-umbrella-80278
03/11/2022, 8:43 PMconst installGitlabAgent = new local.Command("install-gitlab-agent", {
create: `echo ${gitlabAgentContainer.containerLogs} | kubectl apply -f -`,
environment: {
KUBECONFIG: provider.kubeconfig,
},
});
🤷
?billowy-army-68599
freezing-umbrella-80278
03/11/2022, 8:46 PMbillowy-army-68599
freezing-umbrella-80278
03/11/2022, 8:46 PMbillowy-army-68599
freezing-umbrella-80278
03/11/2022, 8:47 PMbillowy-army-68599
REDACTED
freezing-umbrella-80278
03/11/2022, 8:48 PMfreezing-umbrella-80278
03/11/2022, 8:48 PMbillowy-army-68599
freezing-umbrella-80278
03/11/2022, 8:51 PMbillowy-army-68599