Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix schema resources #104

Merged
merged 9 commits into from
Nov 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,14 @@ jobs:
uses: actions/setup-node@v1
with:
node-version: 16.x
- uses: actions/setup-go@v3
with:
go-version: '>=1.18.0'
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.5.0
with:
repo: pulumi/pulumictl

- run: go version
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
- name: Build SDKs
Expand Down
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,14 @@ install_provider:: build_provider
gen_nodejs_sdk::
rm -rf sdk/nodejs
cd provider/cmd/${CODEGEN} && go run . nodejs ../../../sdk/nodejs ${SCHEMA_PATH}
echo 'import "@pulumi/aws";' >> sdk/nodejs/index.ts
echo 'import "@pulumi/kubernetes";' >> sdk/nodejs/index.ts
echo 'import "@pulumi/random";' >> sdk/nodejs/index.ts

build_nodejs_sdk:: VERSION := $(shell pulumictl get version --language javascript)
build_nodejs_sdk:: gen_nodejs_sdk
cd sdk/nodejs/ && \
echo "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
echo "module fake_nodejs_module // Exclude this directory from Go tools\n\ngo 1.18" > go.mod && \
npm install && \
npm run build && \
cp -R scripts bin/ && \
Expand All @@ -53,7 +56,7 @@ gen_python_sdk::
build_python_sdk:: PYPI_VERSION := $(shell pulumictl get version --language python)
build_python_sdk:: gen_python_sdk
cd sdk/python/ && \
echo "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.17" > go.mod && \
echo "module fake_python_module // Exclude this directory from Go tools\n\ngo 1.18" > go.mod && \
cp ../../README.md . && \
python3 setup.py clean --all 2>/dev/null && \
rm -rf ./bin/ ../python.bin/ && cp -R . ../python.bin && mv ../python.bin ./bin && \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class ArgoCD extends pulumi.ComponentResource {
/**
* The Helm Chart used to deploy ArgoCD.
*/
public readonly chart: kubernetes.helm.v3.Chart;
public readonly chart: kubernetes.helm.v3.Release;

/**
* The Namespace used to deploy the component.
Expand Down Expand Up @@ -127,14 +127,14 @@ export class ArgoCD extends pulumi.ComponentResource {
repo: string,
values: any,
opts?: pulumi.ResourceOptions
): kubernetes.helm.v3.Chart {
const helmChart = new kubernetes.helm.v3.Chart(
): kubernetes.helm.v3.Release {
const helmChart = new kubernetes.helm.v3.Release(
this.args.name,
{
chart: chart,
namespace: this.namespace.metadata.name,
version: version,
fetchOpts: {
repositoryOpts: {
repo: repo,
},
values: values,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ export class Calico extends ApplicationAddon<CalicoArgs> {
const applicationOpts = pulumi.mergeOptions(opts, {
dependsOn: this.installationCrd
});
this.application = this.setupApplication(resourceOpts);
this.application = this.setupApplication(applicationOpts);

const installationOpts = pulumi.mergeOptions(resourceOpts, {
dependsOn: [
this.application,
this.installationCrd,
],
});
this.installation = this.setupInstallation(resourceOpts);
this.installation = this.setupInstallation(installationOpts);

this.registerOutputs({
namespace: this.namespace,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,22 @@ export class ClusterAddons extends pulumi.ComponentResource {
this.defaultZoneId = zoneData.then(zone => zone.id);
}

const argocdResourcesOpts = pulumi.mergeOptions(opts, {
parent: this,
dependsOn: [this.argocd],
provider: this.args.k8sProvider,
});
const argocdDeployment = kubernetes.apps.v1.Deployment.get(
"argocd-deployment",
pulumi.interpolate`${this.argocd.chart.namespace}/${this.argocd.chart.status.name}-server`,
argocdResourcesOpts
);

// Create ResourceOptions for Applications
const argocdApplicationsOpts = pulumi.mergeOptions(opts, {
parent: this,
dependsOn: [
this.argocd.chart.getResource(
"apps/v1/Deployment",
"system-argocd/kluster1-argocd-server"
),
this.argocd.chart.getResource(
"apiextensions.k8s.io/v1/CustomResourceDefinition",
"argocdextensions.argoproj.io"
),
argocdDeployment,
],
});
this.certManager = this.setupCertManager(argocdApplicationsOpts);
Expand Down
44 changes: 22 additions & 22 deletions provider/cmd/pulumi-resource-cloud-toolkit-aws/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions provider/cmd/pulumi-resource-cloud-toolkit-aws/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"version": "${VERSION}",
"bin": "bin/index.js",
"dependencies": {
"@pulumi/aws": "^5.10.0",
"@pulumi/kubernetes": "^3.21.2",
"@pulumi/pulumi": "^3.34.1",
"@pulumi/random": "^4.8.2",
"@pulumi/tls": "^4.6.1",
"@pulumi/aws": "5.21.1",
"@pulumi/kubernetes": "3.22.1",
"@pulumi/pulumi": "3.48.0",
"@pulumi/random": "4.8.2",
"@pulumi/tls": "4.6.1",
"lodash.defaultsdeep": "^4.6.1",
"yaml": "^2.1.1"
},
Expand Down