Skip to content

Validate gitpod config patch, rendered gitpod installer YAML in preflight checks #12015

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

Closed
Tracked by #12196
adrienthebo opened this issue Aug 9, 2022 · 2 comments · Fixed by #13168
Closed
Tracked by #12196
Assignees
Labels
component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team

Comments

@adrienthebo
Copy link
Contributor

adrienthebo commented Aug 9, 2022

The gitpod config patch provides a very low level interface to modify Gitpod's installation configuration. A malformed config patch can produce invalid YAML, or valid YAML that doesn't follow the gitpod-installer config schema.

Malformed configuration should be caught at the preflight check and should ideally provide some level of diagnostics about what's failing and how to fix it.

  • The gitpod config patch file is valid YAML
  • The merge result of the gitpod config patch and the gitpod installer config is valid YAML
  • The final gitpod config YAML follows the gitpod-installer schema (as validated with /app/installer validate)

Steps to reproduce

The following YAML patch will fail on current versions of gitpod:

experimental:
  webapp:
    proxy:
      # allowed values are "ClusterIP", "LoadBalancer", "NodePort", "ExternalName" consistent with https://pkg.go.dev/k8s.io/api/core/v1#ServiceType
      serviceType: "NodePort"
# /app/installer validate config -c config.yaml 
{
  "valid": false,
  "warn": [
    "Deprecated config parameter: experimental.webapp.proxy.serviceType=NodePort"
  ],
  "fatal": [
    "Cannot set proxy service type in both components and experimental"
  ]
}
Error: configuration invalid
Usage:
  gitpod-installer validate config [flags]
@adrienthebo adrienthebo added component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team labels Aug 9, 2022
@Pothulapati Pothulapati self-assigned this Aug 11, 2022
@Pothulapati Pothulapati moved this from 📓Scheduled to ⚒In Progress in 🚚 Security, Infrastructure, and Delivery Team (SID) Aug 11, 2022
@Pothulapati Pothulapati moved this from ⚒In Progress to 📓Scheduled in 🚚 Security, Infrastructure, and Delivery Team (SID) Sep 6, 2022
@Pothulapati
Copy link
Contributor

👋

Un-assigning myself as this is now planned to be done differently with the new installer env abstraction. Happy to take it up in the new path too if you haven't already made progress @mrsimonemms

@mrsimonemms
Copy link
Contributor

Thanks @Pothulapati. I've added this to the main refactoring ticket

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: install Terraform installation scripts, helm charts, installer images team: delivery Issue belongs to the self-hosted team
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants