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

Add OpenStack standalone control plane Helm chart and templates #696

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

bnallapeta
Copy link
Member

@bnallapeta bnallapeta commented Nov 28, 2024

Resolves #592.

This PR introduces a Helm chart and associated templates to facilitate the deployment of standalone control plane on OpenStack within the Hybrid Multi-Cloud (HMC) platform.

Copy link
Contributor

@a13x5 a13x5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parameter names, some syntax questions.

Comment on lines 33 to 36
cloudConfig:
global:
auth-url: {{ .Values.openstack.authURL }}
region: {{ .Values.openstack.region }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These make no sense with secret.create: false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I mentioned in the other comment, I wanted to remove this entire block but docs says that these two fields are required. It does make sense that it won't look at this block if we are using an existing secret.

But let me test it by removing them and make sure it works.

templates/cluster/openstack-standalone-cp/values.yaml Outdated Show resolved Hide resolved
templates/cluster/openstack-standalone-cp/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too clogged with comments. Please move them to a proper docs, they will rot here at some point.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point of putting the comments which other files do not have is so that a user does not have to refer docs to fill in the values.yaml :)

for detailed info, they can refer the docs which I will update too. But just a short explanation would help imo. The benefit of this outweighs the "clogged feel" of the page.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, let me elaborate:

What you showing is make sense when you're writing a standalone chart and the only documentation is a README.md in the same directory which gets generated from comments in the values.yaml. So you have one source of docs.

In our case user will not use charts directly, but rather create ManagedCluster object and we have separate documentation, so now we have 2 places where we should document values - this means rot at some point.

Ans lastly I should mention consistency:

  • All other charts' values aren't documented (should we document all of them then?)
  • Not all options are documented in this chart
  • Documentation strings style is mostly incorrect and inconsistent:

Yours:

bastion:
  enabled: false # Enable bastion server for SSH access
  spec:
    providerID: "" # Provider ID of the bastion server
    flavor: "" # Flavor of the bastion server
    image: # Image of the bastion server
      filter:
        name: "" # Name of the image

Correct (it's even mentioned in the docs you've shared):

bastion:
  # Enable bastion server for SSH access
  enabled: false
  # Bastion instance spec
  # Accepts arbitrary parameters for OpenStackMachineSpec 
  spec:
    # Provider ID of the bastion server
    providerID: ""
    # Flavor of the bastion server
    flavor: "" 
    # Image of the bastion server
    image:
      # ImageFilter parameters for the image
      filter:
        # Name of the image
        name: ""
        # Optional tags which associated with an image
        # tags: []        

- {{ $tag }}
{{- end }}
{{- end }}
{{- if gt (len .Values.controlplane.portOpts) 0 }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check looks extra and you probably can just use with keyword here to be more consistent. Applicable to other if gt checks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if you use with, and let's say portOpts is defined like this:

portOpts: []

then in the rendered template, we get empty portOpts yaml. Using a gt keyword prevents this. Same for other vars - maps or list.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Is the portOpts: [] causing any issues?
  2. For securityGroups you have values defined, so it will never be empty (unless user explicitly delete defaults)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Standalone controlplane template for OpenStack
3 participants