sparse-intern-71089
08/02/2019, 9:15 PMhandsome-actor-1155
08/02/2019, 9:46 PMreturn new docker.Image("correctiveActionProducer", {
imageName: ecr.repositoryUrl,
build: "./",
registry: ecrCreds
});
Then I pass that image to my deployment:
export function createProducer(
anomalyTopic: Output<any>,
correctionTopic: Output<any>,
provider: k8s.Provider,
image: Image): void {
const applicationName = config.require("applicationName");
new k8s.apps.v1.Deployment(applicationName, {
apiVersion: "apps/v1",
kind: "Deployment",
metadata: {
name: applicationName
},
spec: {
replicas: 1,
selector: {
matchLabels: {"asset": "stream", "app": applicationName}
},
template: {
metadata: {
labels: {"asset": "stream", "app": applicationName}
},
spec: {
containers: [{
name: applicationName,
image: image.imageName,
...
const appImage = app.createAndUploadImage();
app.createProducer(
serviceStack.getOutput("anomalyTopic"),
serviceStack.getOutput("correctiveActionTopic"),
k8sApplicationProvider,
appImage
);