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

curved-morning-41391

12/18/2023, 10:22 PM
Hey, has anyone installed knative with pulumi? It looks like it has overlapping CRDs between its eventing and serving installs
Copy code
# Deploy Knative Serving CRDs
knative_serving_crds = k8s.yaml.ConfigFile(
    "knative-serving-crds",
    file="<https://github.com/knative/serving/releases/download/v0.25.0/serving-crds.yaml>",
    opts=pulumi.ResourceOptions(provider=k8s_provider),
)

# Deploy Knative Serving core components
knative_serving_core = k8s.yaml.ConfigFile(
    "knative-serving-core",
    file="<https://github.com/knative/serving/releases/download/v0.25.0/serving-core.yaml>",
    opts=pulumi.ResourceOptions(
        provider=k8s_provider, depends_on=[knative_serving_crds]
    ),
)

# Deploy Knative Eventing CRDs
knative_eventing_crds = k8s.yaml.ConfigFile(
    "knative-eventing-crds",
    file="<https://github.com/knative/eventing/releases/download/v0.25.0/eventing-crds.yaml>",
    opts=pulumi.ResourceOptions(provider=k8s_provider),
)

# Deploy Knative Eventing core components
knative_eventing_core = k8s.yaml.ConfigFile(
    "knative-eventing-core",
    file="<https://github.com/knative/eventing/releases/download/v0.25.0/eventing-core.yaml>",
    opts=pulumi.ResourceOptions(
        provider=k8s_provider, depends_on=[knative_eventing_crds]
    ),
)
which gives
Copy code
Duplicate resource URN 'urn:pulumi:dev::infra::kubernetes:yaml:ConfigFile$kubernetes:<http://apiextensions.k8s.io/v1:CustomResourceDefinition::images.caching.internal.knative.dev';|apiextensions.k8s.io/v1:CustomResourceDefinition::images.caching.internal.knative.dev';> try giving it a unique name
s

salmon-gold-74709

12/21/2023, 3:39 PM
Maybe write a Pulumi transformation which removes some parts of one of the YAML data, so there's no conflict? Transformations let you patch the YAML before it's applied
2 Views