Skip to content

Major issues since at least 1.5.2 #152

@maxemann96

Description

@maxemann96

What happended

Since version at least 1.5.2, the produced output is not usable and has some serious issues. To point the issue out, I minimized my setup to Karpenter, Keycloak, MariaDB and Strimzi custom resource definitions. You can use the following script to produce the same output, as I got (BEWARE: This will delete the folders k8s and nodejs from the directory, the script is residing in, if existent!)

# !/bin/sh
set -e

SCRIPT_DIR="$(dirname "$0")"
cd "$SCRIPT_DIR"

rm -Rf "k8s" "nodejs"

mkdir nodejs
mkdir k8s
cd k8s

curl "https://raw.githubusercontent.com/aws/karpenter-provider-aws/v1.0.2/pkg/apis/crds/karpenter.k8s.aws_ec2nodeclasses.yaml" -o Karpenter_karpenter.k8s.aws_ec2nodeclasses.yaml

curl "https://raw.githubusercontent.com/aws/karpenter-provider-aws/v1.0.2/pkg/apis/crds/karpenter.sh_nodeclaims.yaml" -o Karpenter_karpenter.sh_nodeclaims.yaml

curl "https://raw.githubusercontent.com/aws/karpenter-provider-aws/v1.0.2/pkg/apis/crds/karpenter.sh_nodepools.yaml" -o Karpenter_karpenter.sh_nodepools.yaml

curl "https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/24.0.4/kubernetes/keycloaks.k8s.keycloak.org-v1.yml" -o Keycloak_keycloaks.k8s.keycloak.org-v1.yaml

curl "https://raw.githubusercontent.com/keycloak/keycloak-k8s-resources/24.0.4/kubernetes/keycloakrealmimports.k8s.keycloak.org-v1.yml" -o Keycloak_keycloakrealmimports.k8s.keycloak.org-v1.yaml

for file in $(echo "backups connections databases grants mariadbs maxscales restores sqljobs users"); do
    curl "https://raw.githubusercontent.com/mariadb-operator/mariadb-operator/helm-chart-0.29.0/config/crd/bases/k8s.mariadb.com_$file.yaml" -o "MariaDB_k8s.mariadb.com_$file.yaml"
done;

curl "https://github.com/strimzi/strimzi-kafka-operator/releases/download/0.43.0/strimzi-crds-0.43.0.yaml" -o Strimzi_strimzi-crds-0.43.0.yaml -L

cd ..

crd2pulumi --force --nodejs --nodejsPath="./nodejs" ./k8s/*.yaml

Karpenter

nodejs/karpenter/v1beta1 is generated, but nodejs/karpenter/v1 not. Works with 1.4.0.

Keycloak

The generated pulumi type is kubernetes:k8s.mariadb.com/v2alpha1:Keycloak. There is no mariadb in the Keycloak crds. Works with 1.4.0

Strimzi

From nodejs/types/input.ts, the hyphen is not escaped:

        /**
         * **Currently not supported** JVM Options for pods.
         */
        export interface KafkaBridgeSpecJvmOptions {
            /**
             * A map of -XX options to the JVM.
             */
            -XX?: pulumi.Input<{[key: string]: pulumi.Input<string>}>;

Previous behaviour

Keycloak and MariaDB worked before (don't know, if the contain hyphens, I have another workaround to fix hyphens here, not part of the script above). For strimzi, I opened #103 a while ago, this was closed as fixed with 1.5.0.

Useful information

Output of crd2pulumi version: v1.5.2. Directly downloaded from the GitHub releases page.

Metadata

Metadata

Assignees

Labels

area/codegenAffects quality or correctness of generated codearea/schemaRelated to support for CRD or Pulumi schema supportimpact/regressionSomething that used to work, but is now brokenkind/bugSome behavior is incorrect or out of specresolution/fixedThis issue was fixed

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions