Closed sc250024 closed 4 years ago
This kind of templates just work with the master branch version. Try to clone the git repo and build it from master branch. It worked for me.
For MacOS export CGO_ENABLED=0 GOOS=darwin GOARCH=amd64
This kind of templates just work with the master branch version. Try to clone the git repo and build it from master branch. It worked for me.
For MacOS export CGO_ENABLED=0 GOOS=darwin GOARCH=amd64
Wow, it was that simple. Thanks @HelderGualberto Indeed that's the case: https://github.com/norwoodj/helm-docs/compare/v0.13.0...master
This feature hasn't been tagged and released then? @norwoodj Is there a reason there's a delay for cutting a release?
No reason, no. Sorry, I've been dealing with carpal tunnel issues the last few months, and have had to completely ignore this repository. I will be better going forward.
@norwoodj Do you need help with the repo? I'm a pretty avid user, and can start picking up some issues.
Description
The title of the issue is admittedly a bit weird, but I'm not sure what else is going on with the underlying
README.md.gotmpl
file I am using.Long story short, I am helping to move the cluster-autoscaler Helm chart from the helm/charts repository to the kubernetes/autoscaler repository because of the eventual deprecation of the
stable
channel.I am hoping to make the new README enabled with
helm-docs
, but I noticed that when trying to template theREADME.md
file from that project, I receive errors that some of the templates are "not defined."Expected Behavior
The template should render successfully, just like full-template example.
Actual behavior
I get error messages for some of the templates, but not all of them:
{{ template "chart.header" . }}
{{ template "chart.description" . }}
{{ template "chart.type" . }}
{{ template "chart.typeLine" . }}
{{ template "chart.typeBadge" . }}
{{ template "chart.appVersion" . }}
{{ template "chart.appVersionLine" . }}
{{ template "chart.appVersionBadge" . }}
{{ template "chart.appVersion" . }}
{{ template "chart.appVersionLine" . }}
{{ template "chart.appVersionBadge" . }}
{{ template "chart.homepage" . }}
{{ template "chart.homepageLine" . }}
{{ template "chart.maintainersHeader" . }}
{{ template "chart.maintainersTable" . }}
{{ template "chart.maintainersSection" . }}
{{ template "chart.sourcesHeader" . }}
{{ template "chart.sourcesList" . }}
{{ template "chart.sourcesSection" . }}
All of the non-working templates receive an error similar to this:
Additional
Here's the information of my underlying environment:
version.BuildInfo{Version:"v3.2.4", GitCommit:"0ad800ef43d3b826f31a5ad8dfbb4fe05d143688", GitTreeState:"dirty", GoVersion:"go1.14.3"}
helm-docs version 0.13.0
Are here are the files I used. Note that the
README.md.gotmpl
contains all templates that work. Adding any of theNon-working templates
list above results in an error, and does not render.README.md.gotmpl
Chart.yaml
```yaml apiVersion: v2 appVersion: 1.18.1 description: Scales Kubernetes worker nodes within autoscaling groups. engine: gotpl home: https://github.com/kubernetes/autoscaler icon: https://github.com/kubernetes/kubernetes/blob/master/logo/logo.png maintainers: - email: guyjtempleton@googlemail.com name: gjtempleton - email: mgoodness@gmail.com name: mgoodness - email: scott.crooks@gmail.com name: sc250024 - email: e.bailey@sportradar.com name: yurrriq name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler - https://github.com/spotinst/kubernetes-autoscaler/tree/master/cluster-autoscaler type: application version: 1.0.0 ```values.yaml
```yaml ## Ref: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/#affinity-and-anti-affinity # affinity -- Affinity for pod assignment affinity: {} autoDiscovery: # Only cloudProvider `aws` and `gce` are supported by auto-discovery at this time # AWS: Set tags as described in https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md#auto-discovery-setup # autoDiscovery.clusterName -- Enable autodiscovery for name in ASG tag (only `cloudProvider=aws`). Must be set for `cloudProvider=gce`, but no MIG tagging required. clusterName: # cluster.local # autoDiscovery.tags -- ASG tags to match, run through `tpl`. tags: - k8s.io/cluster-autoscaler/enabled - k8s.io/cluster-autoscaler/{{ .Values.autoDiscovery.clusterName }} # - kubernetes.io/cluster/{{ .Values.autoDiscovery.clusterName }} # autoscalingGroups -- For AWS. At least one element is required if not using `autoDiscovery`. For example: # autoscalingGroups: [] # - name: asg1 # maxSize: 2 # minSize: 1 # - name: asg2 # maxSize: 2 # minSize: 1 # autoscalingGroupsnamePrefix -- For GCE. At least one element is required if not using `autoDiscovery`. For example: # autoscalingGroupsnamePrefix: [] # - name: ig01 # maxSize: 10 # minSize: 0 # - name: ig02 # maxSize: 10 # minSize: 0 # awsAccessKeyID -- AWS access key ID ([if AWS user keys used](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md#using-aws-credentials)) awsAccessKeyID: "" # awsRegion -- AWS region (required if `cloudProvider=aws`) awsRegion: us-east-1 # awsSecretAccessKey -- AWS access secret key ([if AWS user keys used](https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/cloudprovider/aws/README.md#using-aws-credentials)) awsSecretAccessKey: "" # azureClientID -- Service Principal ClientID with contributor permission to Cluster and Node ResourceGroup. # Required if `cloudProvider=azure` azureClientID: "" # azureClientSecret -- Service Principal ClientSecret with contributor permission to Cluster and Node ResourceGroup. # Required if `cloudProvider=azure` azureClientSecret: "" # azureResourceGroup -- Azure resource group that the cluster is located. # Required if `cloudProvider=azure` azureResourceGroup: "" # azureSubscriptionID -- Azure subscription where the resources are located. # Required if `cloudProvider=azure` azureSubscriptionID: "" # azureTenantID -- Azure tenant where the resources are located. # Required if `cloudProvider=azure` azureTenantID: "" # azureVMType -- Azure VM type. azureVMType: "AKS" # azureClusterName -- Azure AKS cluster name. # Required if `cloudProvider=azure` azureClusterName: "" # azureNodeResourceGroup -- Azure resource group where the cluster's nodes are located, typically set as `MC_