Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if we parse yamls correctly #143

Closed
c-pius opened this issue Jan 21, 2025 · 1 comment · Fixed by #149
Closed

Check if we parse yamls correctly #143

c-pius opened this issue Jan 21, 2025 · 1 comment · Fixed by #149
Assignees
Labels
bug Something isn't working

Comments

@c-pius
Copy link
Contributor

c-pius commented Jan 21, 2025

Description

This is likely an error with old CLI, but we should check if we have the same issue with modulectl.

Telemetry created a ModuleTempalte where default CR starts with ---, see: https://github.tools.sap/kyma/module-manifests/blob/9012a3d1325e1f21dc8a0fcf94b903bb35fc9e3f/modules/telemetry/experimental/telemetry-default-cr.yaml#L1

---
apiVersion: operator.kyma-project.io/v1alpha1
kind: Telemetry
metadata:
  labels:
    app.kubernetes.io/name: telemetry
    app.kubernetes.io/instance: default
    app.kubernetes.io/part-of: telemetry-manager
    app.kubernetes.io/managed-by: kustomize
    app.kubernetes.io/created-by: telemetry-manager
  name: default

This was copied as is into the ModuleTempalte, see: https://github.tools.sap/kyma/kyma-modules/blob/7e5a2eae968a238eaf57f41a1b263dc43425d0c9/experimental/moduletemplate-telemetry.yaml#L16

apiVersion: operator.kyma-project.io/v1beta2
kind: ModuleTemplate
metadata:
  name: telemetry-experimental
  namespace: kcp-system
  labels:
    "operator.kyma-project.io/module-name": "telemetry"
  annotations:
    "operator.kyma-project.io/doc-url": "https://help.sap.com/docs/btp/sap-business-technology-platform/kyma-telemetry-module"
    "operator.kyma-project.io/is-cluster-scoped": "false"
    "operator.kyma-project.io/module-version": "1.32.0-experimental" 
spec:
  channel: experimental
  mandatory: false 
  data:
    ---
    apiVersion: operator.kyma-project.io/v1alpha1
    kind: Telemetry
    metadata:
      labels:
        app.kubernetes.io/name: telemetry
        app.kubernetes.io/instance: default
        app.kubernetes.io/part-of: telemetry-manager
        app.kubernetes.io/managed-by: kustomize
        app.kubernetes.io/created-by: telemetry-manager
      name: default
    
  descriptor:
    component:
      componentReferences: []
      name: kyma-project.io/module/telemetry
// ...

Expected result

ModuleTemplate shall not have yaml separators ---

Actual result

ModuleTemplate has yaml separators ---

Steps to reproduce

Troubleshooting

@k15r
Copy link

k15r commented Jan 22, 2025

instead of copy and paste of the input data you could do something like
yq -n '.spec.data=load(.telemetry-default-cr.yaml)'

@c-pius c-pius added the bug Something isn't working label Jan 23, 2025
@nesmabadr nesmabadr self-assigned this Jan 29, 2025
@nesmabadr nesmabadr removed their assignment Jan 30, 2025
@c-pius c-pius self-assigned this Jan 31, 2025
@c-pius c-pius assigned nesmabadr and unassigned c-pius Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants