Bug [3.0.0-rc2] bad character U+002D '-' #106

Closed
opened 2025-01-17 16:08:57 +00:00 by SteelAlloy · 7 comments
SteelAlloy commented 2025-01-17 16:08:57 +00:00 (Migrated from github.com)

When installing the chart generated by Katenary, Helm throws the following error :

❯ katenary convert -c compose.yaml -o ./chart
❯ helm upgrade --install gitlab ./chart
Release "gitlab" does not exist. Installing it now.
Error: parse error at (gitlab/templates/gitlab-postgres/gitlab_postgres.volumeclaim.yaml:1): bad character U+002D '-'

Reproducible example :

compose.yaml

services:
  gitlab:
    image: gitlab/gitlab-ee:17.4.3-ee.0
    restart: always
    container_name: gitlab
    environment:
      GITLAB_ROOT_PASSWORD: "FbHwagnIboY8Rv"
      GITLAB_OMNIBUS_CONFIG: |
        # Add any other gitlab.rb configuration here, each on its own line
        external_url = 'http://git.127.0.0.1.nip.io';
        # Postgres
        postgresql['enable'] = false;
        gitlab_rails['db_adapter'] = 'postgresql';
        gitlab_rails['db_encoding'] = 'utf8';
        gitlab_rails['db_host'] = 'gitlab-postgres';
        gitlab_rails['db_port'] = 5432;
        gitlab_rails['db_username'] = 'gitlab';
        gitlab_rails['db_password'] = 'gitlab';
    ports:
      - '80:80'
      - '22:22'
    volumes:
      - 'gitlab_config:/etc/gitlab'
      - 'gitlab_logs:/var/log/gitlab'
      - 'gitlab_data:/var/opt/gitlab'
    shm_size: '256m'
    networks:
      - network
  gitlab-postgres:
    image: postgres:15
    container_name: gitlab-postgres
    environment:
      POSTGRES_USER: gitlab
      POSTGRES_PASSWORD: gitlab
      POSTGRES_DB: gitlabhq_production
    ports:
      - '5432:5432'
    shm_size: 128mb
    networks:
      - network
    volumes:
      - 'gitlab_postgres:/var/lib/postgresql/data'

networks:
  network:
    driver: bridge
    name: gitlab_network

volumes:
  gitlab_config:
  gitlab_logs:
  gitlab_data:
  gitlab_postgres:

katenary.yaml

# yaml-language-server: $schema=./katenary.schema.json

gitlab:
  main-app: true
  ingress:
    hostname: git.127.0.0.1.nip.io
    port: 80
  secrets:
    - GITLAB_ROOT_PASSWORD
    - GITLAB_OMNIBUS_CONFIG
  values:
    - GITLAB_ROOT_PASSWORD
    - GITLAB_OMNIBUS_CONFIG
postgres:
  ignore: false
When installing the chart generated by Katenary, Helm throws the following error : ```shell ❯ katenary convert -c compose.yaml -o ./chart ❯ helm upgrade --install gitlab ./chart Release "gitlab" does not exist. Installing it now. Error: parse error at (gitlab/templates/gitlab-postgres/gitlab_postgres.volumeclaim.yaml:1): bad character U+002D '-' ``` Reproducible example : ### `compose.yaml` ```yaml services: gitlab: image: gitlab/gitlab-ee:17.4.3-ee.0 restart: always container_name: gitlab environment: GITLAB_ROOT_PASSWORD: "FbHwagnIboY8Rv" GITLAB_OMNIBUS_CONFIG: | # Add any other gitlab.rb configuration here, each on its own line external_url = 'http://git.127.0.0.1.nip.io'; # Postgres postgresql['enable'] = false; gitlab_rails['db_adapter'] = 'postgresql'; gitlab_rails['db_encoding'] = 'utf8'; gitlab_rails['db_host'] = 'gitlab-postgres'; gitlab_rails['db_port'] = 5432; gitlab_rails['db_username'] = 'gitlab'; gitlab_rails['db_password'] = 'gitlab'; ports: - '80:80' - '22:22' volumes: - 'gitlab_config:/etc/gitlab' - 'gitlab_logs:/var/log/gitlab' - 'gitlab_data:/var/opt/gitlab' shm_size: '256m' networks: - network gitlab-postgres: image: postgres:15 container_name: gitlab-postgres environment: POSTGRES_USER: gitlab POSTGRES_PASSWORD: gitlab POSTGRES_DB: gitlabhq_production ports: - '5432:5432' shm_size: 128mb networks: - network volumes: - 'gitlab_postgres:/var/lib/postgresql/data' networks: network: driver: bridge name: gitlab_network volumes: gitlab_config: gitlab_logs: gitlab_data: gitlab_postgres: ``` ### `katenary.yaml` ```yaml # yaml-language-server: $schema=./katenary.schema.json gitlab: main-app: true ingress: hostname: git.127.0.0.1.nip.io port: 80 secrets: - GITLAB_ROOT_PASSWORD - GITLAB_OMNIBUS_CONFIG values: - GITLAB_ROOT_PASSWORD - GITLAB_OMNIBUS_CONFIG postgres: ignore: false ```
ElRaphik commented 2025-01-17 17:31:43 +00:00 (Migrated from github.com)

mentionned in comment in #74

mentionned in comment in #74

My god, this remaining problem is a pain in the...
I know where is the problem, will fix it tomorrow

My god, this remaining problem is a pain in the... I know where is the problem, will fix it tomorrow

It should be fixed in main branch, can you try it please?

It should be fixed in main branch, can you try it please?
SteelAlloy commented 2025-06-25 07:47:03 +00:00 (Migrated from github.com)

New error on branch develop (same on master)

❯ helm upgrade --install gitlab ./chart
Error: UPGRADE FAILED: failed to create resource: Deployment.apps "gitlab-katenary-bugs-gitlab-postgres" is invalid: spec.template.spec.containers[0].name: Invalid value: "gitlab_postgres": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name',  or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?')
New error on branch `develop` (same on `master`) ``` ❯ helm upgrade --install gitlab ./chart Error: UPGRADE FAILED: failed to create resource: Deployment.apps "gitlab-katenary-bugs-gitlab-postgres" is invalid: spec.template.spec.containers[0].name: Invalid value: "gitlab_postgres": a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?') ```

Oh... container_name... OK I see the problem.

Oh... `container_name`... OK I see the problem.
SteelAlloy commented 2025-07-12 12:56:51 +00:00 (Migrated from github.com)

Fixed in the latest RC 🙂

Fixed in the latest RC 🙂

Thanks a lot folk 👍🏻

Thanks a lot folk 👍🏻
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Katenary/katenary#106
No description provided.