Fixing up the linting for the repository
MODIFY
.github/workflows/pr.yml
.github/workflows/pr.yml
@@ -17,3 +17,26 @@ jobs:
**Note for the maintainer:** To run the acceptance tests, please comment */run-example-tests* on the PR
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ lint:
+ strategy:
+ matrix:
+ platform: [ ubuntu-latest ]
+ yarn-version: [ 1.13.0 ]
+ node-version: [ 12.x ]
+ runs-on: ${{ matrix.platform }}
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup node
+ uses: actions/setup-node@v1
+ with:
+ node-version: ${{ matrix.node-version }}
+ - name: Install Yarn
+ run: curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version ${{ matrix.yarn-version }}
+ - name: Update PATH for Yarn
+ run: |
+ echo "::add-path::$HOME/.yarn/bin"
+ echo "::add-path::$HOME/.config/yarn/global/node_modules/.bin"
+ - name: setup linting tool
+ run: make install
+ - name: Lint typescript files
+ run: make lint

MODIFY
aws-ts-k8s-mern-voting-app/index.ts
aws-ts-k8s-mern-voting-app/index.ts
@@ -65,14 +65,14 @@ const databaseDeployment = new k8s.apps.v1.Deployment(databaseAppName, {
],
volumeMounts: [{ // The EBS volume is mounted to the pod, allowing the database to permanently store data
name: "persistent-volume",
- mountPath: "/persistentVolume"
+ mountPath: "/persistentVolume",
}],
resources: {
limits: {
memory: "1Gi",
- cpu: "1000m"
- }
- }
+ cpu: "1000m",
+ },
+ },
}],
volumes: [{
name: "persistent-volume",
@@ -88,16 +88,16 @@ const databaseDeployment = new k8s.apps.v1.Deployment(databaseAppName, {
key: "failure-domain.beta.kubernetes.io/zone",
operator: "In",
values: [ebsVolume.availabilityZone],
- }]
- }]
- }
- }
- }
- }
+ }],
+ }],
+ },
+ },
+ },
+ },
},
strategy: {
- type: "Recreate"
- }
+ type: "Recreate",
+ },
}}, {
deleteBeforeReplace: true,
provider: eksCluster.provider,
@@ -114,7 +114,7 @@ const databasesideListener = new k8s.core.v1.Service("database-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
const mongodbAddress = databasesideListener.spec.clusterIP;
@@ -145,12 +145,12 @@ const serverDeployment = new k8s.apps.v1.Deployment("server-side-service", {
resources: {
limits: {
memory: "500Mi",
- cpu: "500m"
- }
- }
+ cpu: "500m",
+ },
+ },
}],
- }
- }
+ },
+ },
}}, {
provider: eksCluster.provider,
});
@@ -166,7 +166,7 @@ const serversideListener = new k8s.core.v1.Service("server-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
// The final deployment is created for the client compoment. It acts as the main web page of the
@@ -191,12 +191,12 @@ const clientDeployment = new k8s.apps.v1.Deployment("client-side-service", {
resources: {
limits: {
memory: "500Mi",
- cpu: "500m"
- }
+ cpu: "500m",
+ },
},
}],
- }
- }
+ },
+ },
}}, {
provider: eksCluster.provider,
});
@@ -213,7 +213,7 @@ const clientsideListener = new k8s.core.v1.Service("client-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
// Exporting the KubeConfig of the cluster, and the URL of the clientside listener. We can now

MODIFY
aws-ts-k8s-voting-app/index.ts
aws-ts-k8s-voting-app/index.ts
@@ -70,14 +70,14 @@ const databaseDeployment = new k8s.apps.v1.Deployment(databaseAppName, {
],
volumeMounts: [{ // The EBS volume is mounted to the pod, allowing the database to permanently store data
name: "persistent-volume",
- mountPath: "/persistentVolume"
+ mountPath: "/persistentVolume",
}],
resources: {
limits: {
memory: "1Gi",
- cpu: "1000m"
- }
- }
+ cpu: "1000m",
+ },
+ },
}],
volumes: [{
name: "persistent-volume",
@@ -93,16 +93,16 @@ const databaseDeployment = new k8s.apps.v1.Deployment(databaseAppName, {
key: "failure-domain.beta.kubernetes.io/zone",
operator: "In",
values: [ebsVolume.availabilityZone],
- }]
- }]
- }
- }
- }
- }
+ }],
+ }],
+ },
+ },
+ },
+ },
},
strategy: {
- type: "Recreate"
- }
+ type: "Recreate",
+ },
}}, {
deleteBeforeReplace: true,
provider: eksCluster.provider,
@@ -119,7 +119,7 @@ const databasesideListener = new k8s.core.v1.Service("database-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
const postgresqlAddress = databasesideListener.spec.clusterIP;
@@ -150,12 +150,12 @@ const serverDeployment = new k8s.apps.v1.Deployment("server-side-service", {
resources: {
limits: {
memory: "500Mi",
- cpu: "500m"
- }
- }
+ cpu: "500m",
+ },
+ },
}],
- }
- }
+ },
+ },
}}, {
provider: eksCluster.provider,
});
@@ -171,7 +171,7 @@ const serversideListener = new k8s.core.v1.Service("server-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
// The final deployment is created for the client compoment. It acts as the main web page of the
@@ -196,12 +196,12 @@ const clientDeployment = new k8s.apps.v1.Deployment("client-side-service", {
resources: {
limits: {
memory: "500Mi",
- cpu: "500m"
- }
+ cpu: "500m",
+ },
},
}],
- }
- }
+ },
+ },
}}, {
provider: eksCluster.provider,
});
@@ -218,7 +218,7 @@ const clientsideListener = new k8s.core.v1.Service("client-side-listener", {
publishNotReadyAddresses: false,
}}, {
provider: eksCluster.provider,
- }
+ },
);
// Exporting the KubeConfig of the cluster, and the URL of the clientside listener. We can now

MODIFY
kubernetes-ts-helm-wordpress/index.ts
kubernetes-ts-helm-wordpress/index.ts
@@ -7,8 +7,8 @@ const wordpress = new k8s.helm.v3.Chart("wpdev", {
version: "9.6.0",
chart: "wordpress",
fetchOpts: {
- repo: "https://charts.bitnami.com/bitnami"
- }
+ repo: "https://charts.bitnami.com/bitnami",
+ },
});
// Get the status field from the wordpress service, and then grab a reference to the ingress field.

Fixing up the linting for the repository