https://pulumi.com logo
#general
Title
# general
c

cool-egg-852

05/15/2019, 7:24 PM
Are there any known bugs with pulumi missing resources with using yaml config files for k8s?
c

creamy-potato-29402

05/15/2019, 7:24 PM
there are not.
c

cool-egg-852

05/15/2019, 7:24 PM
https://raw.githubusercontent.com/jetstack/cert-manager/v0.7.2/deploy/manifests/cert-manager.yaml has a
ServiceAccount
called
cert-manager-cainjector
, but it is skipped over.
The ONLY thing I can see that MAY cause it, is the fact that it is preceded by:
Copy code
---
---
Copy code
---
---
# Source: cert-manager/charts/cainjector/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: cert-manager-cainjector
  namespace: "cert-manager"
  labels:
    app: cainjector
    chart: cainjector-v0.7.2
    release: cert-manager
    heritage: Tiller
c

creamy-potato-29402

05/15/2019, 7:25 PM
that should be ok
is anything else skipped?
c

cool-egg-852

05/15/2019, 7:25 PM
Nope
It’s the only resource in the entire file that is missing.
c

creamy-potato-29402

05/15/2019, 7:26 PM
do you have a reliable reproduction?
c

cool-egg-852

05/15/2019, 7:26 PM
Haven’t tried to reproduce it in a separate project at all.
Copy code
new k8s.yaml.ConfigFile('cert-manager', {
  file: '<https://raw.githubusercontent.com/jetstack/cert-manager/v0.7.2/deploy/manifests/cert-manager.yaml>',
  transformations: [
    (resource: any) => {
      if (resource.kind == 'Deployment' && resource.metadata.name == 'cert-manager') {
        resource.spec.template.spec.containers[0].args.push(
          ...[
            '--default-issuer-name=letsencrypt',
            '--default-issuer-kind=ClusterIssuer',
            '--default-acme-issuer-challenge-type=dns01',
            '--default-acme-issuer-dns01-provider-name=route53'
          ]
        );

        resource.spec.template.spec.containers[0].env.push([
          {
            name: 'AWS_REGION',
            value: awsConfig.require('region')
          },
          {
            name: 'AWS_ACCESS_KEY_ID',
            value: awsAccessKey.id
          },
          {
            name: 'AWS_SECRET_ACCESS_KEY',
            value: awsAccessKey.secret
          }
        ]);
      }
    }
  ]
});
c

creamy-potato-29402

05/15/2019, 7:27 PM
alright, can you file a bug so we don’t forget?
c

cool-egg-852

05/15/2019, 7:27 PM
Yes I can.
c

creamy-potato-29402

05/15/2019, 7:27 PM
thanks!
Oddly, after doing a destroy and trying again, it showed up.