Skip to content

Commit

Permalink
docs: fix documentation for cluster discovery
Browse files Browse the repository at this point in the history
Use the real value in an example.

Signed-off-by: Alexey Palazhchenko <alexey.palazhchenko@talos-systems.com>
  • Loading branch information
AlekSi committed Oct 6, 2021
1 parent ce65ca4 commit facc8c3
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 14 deletions.
29 changes: 20 additions & 9 deletions hack/docgen/main.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions hack/docgen/main_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozilla.org/MPL/2.0/.

package main

import (
"path/filepath"
"testing"
)

// This test mainly exist for easier debugging with debugger.
func TestProcessFile(t *testing.T) {
inputFile := filepath.Join("..", "..", "pkg", "machinery", "config", "types", "v1alpha1", "v1alpha1_types.go")
outputFile := filepath.Join(t.TempDir(), "out.go")
typeName := "Configuration"
processFile(inputFile, outputFile, typeName)
}
4 changes: 2 additions & 2 deletions pkg/machinery/config/types/v1alpha1/v1alpha1_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -1999,7 +1999,7 @@ type RegistryServiceConfig struct {
RegistryDisabled bool `yaml:"disabled,omitempty"`
// description: |
// External service endpoint.
// examples:
// - value: 'constants.DefaultDiscoveryServiceEndpoint'
// examples:
// - value: constants.DefaultDiscoveryServiceEndpoint
RegistryEndpoint string `yaml:"endpoint,omitempty"`
}
5 changes: 4 additions & 1 deletion pkg/machinery/config/types/v1alpha1/v1alpha1_types_doc.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 10 additions & 2 deletions website/content/docs/v0.13/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5500,8 +5500,16 @@ Disable external service discovery registry.
<div class="dt">

External service endpoint.
examples:
- value: 'constants.DefaultDiscoveryServiceEndpoint'



Examples:


``` yaml
endpoint: https://discovery.talos.dev/
```


</div>

Expand Down

0 comments on commit facc8c3

Please sign in to comment.