in lib/addons/argocd/index.ts [99:143]
async deploy(clusterInfo: spi.ClusterInfo): Promise<Construct> {
const namespace = this.createNamespace(clusterInfo);
const sa = this.createServiceAccount(clusterInfo);
sa.node.addDependency(namespace);
const bootstrapRepo = await this.createSecretKey(clusterInfo, namespace);
const defaultValues = {
server: {
serviceAccount: {
create: false
},
config: {
repositories: bootstrapRepo
}
}
};
let values = merge(defaultValues, this.options.values ?? {});
if (this.options.adminPasswordSecretName) {
const adminSecret = await this.createAdminSecret(clusterInfo.cluster.stack.region);
values = merge(
{
configs: {
secret: {
argocdServerAdminPassword: adminSecret
}
}
}, values);
}
this.chartNode = clusterInfo.cluster.addHelmChart("argocd-addon", {
chart: this.options.chart!,
release: this.options.release,
repository: this.options.repository,
version: this.options.version,
namespace: this.options.namespace,
values: values
});
this.chartNode.node.addDependency(sa);
return this.chartNode;
}