mapping values are not allowed in this context
error: error parsing https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml: error converting YAML to JSON: yaml: line 28: mapping values are not allowed in this context
Error: Process completed with exit code 1.```
Please help
The yaml file is here:
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: (unknown)
api-approved.kubernetes.io: https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/pull/1298
name: sparkapplications.sparkoperator.k8s.io
spec:
group: sparkoperator.k8s.io
names:
kind: SparkApplication
listKind: SparkApplicationList
plural: sparkapplications
shortNames:
- sparkapp
singular: sparkapplication
scope: Namespaced
versions:
- name: v1beta2
served: true
storage: true
subresources:
status: { }
additionalPrinterColumns:
- jsonPath: .status.applicationState.state
name: Status
type: string
- jsonPath: .status.executionAttempts
name: Attempts
type: string
- jsonPath: .status.lastSubmissionAttemptTime
name: Start
type: string
- jsonPath: .status.terminationTime
name: Finish
type: string
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
schema:
openAPIV3Schema:
properties:
...
@shanhai3000 are you applying the CRD using the java client, looks like the pasted error is from the kube-apiserver server-side, can you elaborate how to reproduce that error step-by-step?
@shanhai3000 are you applying the CRD using the java client, looks like the pasted error is from the kube-apiserver server-side, can you elaborate how to reproduce that error step-by-step?
Here what I did:
- Fork Upstream Repo Fork the repository kubernetes-client/java so that you can run the github action "CRD Java Model Generate" in your forked repo. (Running github action job manually requires "collaborator" access to the repo).
- Execute Github Action Go to the repo home page, then click "Actions". Find the job "CRD Java Model Generate" under "Workflows" and then run it. The workflow will help convert your CRD yaml manifests to zip-archived java sources which is downloadable after it finishes.
Here is the log:
1s 3s 53s Run read CRD_SRC_ARGS < <(echo 'https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml' | perl -ne 'print join " ", map {"-u $_"} split /,/') CRD Src Args: -u https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml CRD Api Group Prefix Args: Unable to find image 'ghcr.io/kubernetes-client/java/crd-model-gen:v1.0.6' locally v1.0.6: Pulling from kubernetes-client/java/crd-model-gen 188c0c94c7c5: Pulling fs layer 0c7c675703d6: Pulling fs layer cc8c12a437cb: Pulling fs layer f092543453df: Pulling fs layer 65b6bc45957d: Pulling fs layer 4de832df471b: Pulling fs layer 79aa7fa92271: Pulling fs layer 03f8a8057d57: Pulling fs layer 0b8b3a15fc92: Pulling fs layer 6e309bd83595: Pulling fs layer 871380fb4d2e: Pulling fs layer 4f4fb700ef54: Pulling fs layer f092543453df: Waiting 65b6bc45957d: Waiting 4de832df471b: Waiting 79aa7fa92271: Waiting 03f8a8057d57: Waiting 0b8b3a15fc92: Waiting 6e309bd83595: Waiting 871380fb4d2e: Waiting 4f4fb700ef54: Waiting cc8c12a437cb: Verifying Checksum cc8c12a437cb: Download complete 188c0c94c7c5: Verifying Checksum 188c0c94c7c5: Download complete 0c7c675703d6: Verifying Checksum 0c7c675703d6: Download complete 65b6bc45957d: Verifying Checksum 65b6bc45957d: Download complete 4de832df471b: Verifying Checksum 4de832df471b: Download complete 188c0c94c7c5: Pull complete 79aa7fa92271: Verifying Checksum 79aa7fa92271: Download complete 0b8b3a15fc92: Verifying Checksum 0b8b3a15fc92: Download complete 03f8a8057d57: Verifying Checksum 03f8a8057d57: Download complete 6e309bd83595: Verifying Checksum 6e309bd83595: Download complete f092543453df: Verifying Checksum f092543453df: Download complete 4f4fb700ef54: Verifying Checksum 4f4fb700ef54: Download complete 871380fb4d2e: Verifying Checksum 871380fb4d2e: Download complete 0c7c675703d6: Pull complete cc8c12a437cb: Pull complete f092543453df: Pull complete 65b6bc45957d: Pull complete 4de832df471b: Pull complete 79aa7fa92271: Pull complete 03f8a8057d57: Pull complete 0b8b3a15fc92: Pull complete 6e309bd83595: Pull complete 871380fb4d2e: Pull complete 4f4fb700ef54: Pull complete Digest: sha256:d52a5d90453e9dc9a09495cadcf17693ce0d574018f14d24f250939087a740bd Status: Downloaded newer image for ghcr.io/kubernetes-client/java/crd-model-gen:v1.0.6 Creating cluster "kind" ... âĸ Ensuring node image (kindest/node:v1.21.1) đŧ ... â Ensuring node image (kindest/node:v1.21.1) đŧ âĸ Preparing nodes đĻ ... â Preparing nodes đĻ âĸ Writing configuration đ ... â Writing configuration đ âĸ Starting control-plane đšī¸ ... â Starting control-plane đšī¸ âĸ Installing CNI đ ... â Installing CNI đ âĸ Installing StorageClass đž ... â Installing StorageClass đž Set kubectl context to "kind-kind" You can now use your cluster with: kubectl cluster-info --context kind-kind Have a nice day! đ error: error parsing https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml: error converting YAML to JSON: yaml: line 28: mapping values are not allowed in this context Error: Process completed with exit code 1.
Can't generate Java codes using https://github.com/GoogleCloudPlatform/spark-on-k8s-operator/blob/master/charts/spark-operator-chart/crds/sparkoperator.k8s.io_sparkapplications.yaml
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle stale - Mark this issue or PR as rotten with
/lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Mark this issue or PR as fresh with
/remove-lifecycle rotten - Close this issue or PR with
/close - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied - After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied - After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closed
You can:
- Reopen this issue with
/reopen - Mark this issue as fresh with
/remove-lifecycle rotten - Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
In response to this:
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
- After 90d of inactivity,
lifecycle/staleis applied- After 30d of inactivity since
lifecycle/stalewas applied,lifecycle/rottenis applied- After 30d of inactivity since
lifecycle/rottenwas applied, the issue is closedYou can:
- Reopen this issue with
/reopen- Mark this issue as fresh with
/remove-lifecycle rotten- Offer to help out with Issue Triage
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
@kroraina-threesteps How did this work out?