templates

package
v3.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// RegistryServiceTempl defines the template of registry service for systemd.
	RegistryServiceTempl = template.Must(template.New("registryService").Parse(
		dedent.Dedent(`[Unit]
Description=v2 Registry server for Container
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/bin/registry serve /etc/kubekey/registry/config.yaml
Restart=on-failure
[Install]
WantedBy=multi-user.target
    `)))

	// RegistryConfigTempl defines the template of registry's configuration file.
	RegistryConfigTempl = template.Must(template.New("registryConfig").Parse(
		dedent.Dedent(`version: 0.1
log:
  fields:
    service: registry
storage:
    cache:
        layerinfo: inmemory
    filesystem:
        rootdirectory: /mnt/registry
http:
    addr: :443
    tls:
      certificate: /etc/ssl/registry/ssl/{{ .Certificate }}
      key: /etc/ssl/registry/ssl/{{ .Key }}
    `)))
)
View Source
var (
	// HarborServiceTempl defines the template of registry's configuration file.
	HarborServiceTempl = template.Must(template.New("harborSerivce").Parse(
		dedent.Dedent(`[Unit]
Description=Harbor
After=docker.service systemd-networkd.service systemd-resolved.service
Requires=docker.service

[Service]
Type=simple
ExecStart=/usr/local/bin/docker-compose -f {{ .Harbor_install_path }}/docker-compose.yml up
ExecStop=/usr/local/bin/docker-compose -f {{ .Harbor_install_path }}/docker-compose.yml down
Restart=on-failure
[Install]
WantedBy=multi-user.target
    `)))
)

Functions

func Password added in v3.1.0

func Password(kubeConf *common.KubeConf, domain string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL