juju: github.com/wallyworld/juju/cloudconfig/podcfg Index | Files

package podcfg

import "github.com/wallyworld/juju/cloudconfig/podcfg"


Package Files

image.go podcfg.go


const (
    JujudOCINamespace = "jujusolutions"
    JujudOCIName      = "jujud-operator"
    JujudbOCIName     = "juju-db"

func FinishControllerPodConfig Uses

func FinishControllerPodConfig(pcfg *ControllerPodConfig, cfg *config.Config, agentEnvironment map[string]string)

FinishControllerPodConfig sets fields on a ControllerPodConfig that can be determined by inspecting a plain config.Config and the pod constraints at the last moment before creating podspec. It assumes that the supplied Config comes from an environment that has passed through all the validation checks in the Bootstrap func, and that has set an agent-version (via finding the tools to, use for bootstrap, or otherwise).

func GetJujuOCIImagePath Uses

func GetJujuOCIImagePath(controllerCfg controller.Config, ver version.Number, build int) string

GetJujuOCIImagePath returns the jujud oci image path.

func IsJujuOCIImage Uses

func IsJujuOCIImage(imagePath string) bool

IsJujuOCIImage returns true if the image path is for a Juju operator.

func PodLabels Uses

func PodLabels(modelUUID, controllerUUID string, tagger tags.ResourceTagger, jobs []model.MachineJob) map[string]string

PodLabels returns the minimum set of tags that should be set on a pod, if the provider supports them.

func RebuildOldOperatorImagePath Uses

func RebuildOldOperatorImagePath(imagePath string, ver version.Number) string

RebuildOldOperatorImagePath returns a updated image path for the specified juju version.

type BootstrapConfig Uses

type BootstrapConfig struct {

BootstrapConfig represents bootstrap-specific initialization information for a new juju caas pod. This is only relevant for the bootstrap pod.

func (*BootstrapConfig) VerifyConfig Uses

func (cfg *BootstrapConfig) VerifyConfig() (err error)

VerifyConfig verifies that the BootstrapConfig is valid.

type ControllerConfig Uses

type ControllerConfig struct {

ControllerConfig represents controller-specific initialization information for a new juju caas pod. This is only relevant for controller pod.

func (*ControllerConfig) VerifyConfig Uses

func (cfg *ControllerConfig) VerifyConfig() error

VerifyConfig verifies that the ControllerConfig is valid.

type ControllerPodConfig Uses

type ControllerPodConfig struct {
    // Tags is a set of tags/labels to set on the Pod, if supported. This
    // should be populated using the PodLabels method in this package.
    Tags map[string]string

    // Bootstrap contains bootstrap-specific configuration. If this is set,
    // Controller must also be set.
    Bootstrap *BootstrapConfig

    // DisableSSLHostnameVerification can be set to true to tell cloud-init
    // that it shouldn't verify SSL certificates
    DisableSSLHostnameVerification bool

    // ProxySettings encapsulates all proxy-related settings used to access
    // an outside network.
    ProxySettings proxy.Settings

    // Controller contains controller-specific configuration. If this is
    // set, then the instance will be configured as a controller pod.
    Controller *ControllerConfig

    // APIInfo holds the means for the new pod to communicate with the
    // juju state API. Unless the new pod is running a controller (Controller is
    // set), there must be at least one controller address supplied.
    // The entity name must match that of the pod being started,
    // or be empty when starting a controller.
    APIInfo *api.Info

    // ControllerTag identifies the controller.
    ControllerTag names.ControllerTag

    // ControllerName is the controller name.
    ControllerName string

    // JujuVersion is the juju version.
    JujuVersion version.Number

    // OfficialBuild is the build number to use when pulling the juju oci image.
    OfficialBuild int

    // DataDir holds the directory that juju state will be put in the new
    // instance.
    DataDir string

    // LogDir holds the directory that juju logs will be written to.
    LogDir string

    // MetricsSpoolDir represents the spool directory path, where all
    // metrics are stored.
    MetricsSpoolDir string

    // ControllerId identifies the new controller.
    ControllerId string

    // AgentEnvironment defines additional configuration variables to set in
    // the pod agent config.
    AgentEnvironment map[string]string

ControllerPodConfig represents initialization information for a new juju caas controller pod.

func NewBootstrapControllerPodConfig Uses

func NewBootstrapControllerPodConfig(
    config controller.Config,
    series string,
    bootstrapConstraints constraints.Value,
) (*ControllerPodConfig, error)

NewBootstrapControllerPodConfig sets up a basic pod configuration for a bootstrap pod. You'll still need to supply more information, but this takes care of the fixed entries and the ones that are always needed.

func NewControllerPodConfig Uses

func NewControllerPodConfig(
    controllerTag names.ControllerTag,
    series string,
    apiInfo *api.Info,
) (*ControllerPodConfig, error)

NewControllerPodConfig sets up a basic pod configuration. You'll still need to supply more information, but this takes care of the fixed entries and the ones that are always needed.

func (*ControllerPodConfig) APIHostAddrs Uses

func (cfg *ControllerPodConfig) APIHostAddrs() []string

APIHostAddrs returns a list of api server addresses.

func (*ControllerPodConfig) AgentConfig Uses

func (cfg *ControllerPodConfig) AgentConfig(tag names.Tag) (agent.ConfigSetterWriter, error)

AgentConfig returns an agent config.

func (*ControllerPodConfig) GetControllerImagePath Uses

func (cfg *ControllerPodConfig) GetControllerImagePath() string

GetControllerImagePath returns oci image path of jujud for a controller.

func (*ControllerPodConfig) GetHostedModel Uses

func (cfg *ControllerPodConfig) GetHostedModel() (string, bool)

GetHostedModel checks if hosted model was requested to create.

func (*ControllerPodConfig) GetJujuDbOCIImagePath Uses

func (cfg *ControllerPodConfig) GetJujuDbOCIImagePath() string

GetJujuDbOCIImagePath returns the juju-db oci image path.

func (*ControllerPodConfig) GetPodName Uses

func (cfg *ControllerPodConfig) GetPodName() string

GetPodName returns pod name.

func (*ControllerPodConfig) VerifyConfig Uses

func (cfg *ControllerPodConfig) VerifyConfig() (err error)

VerifyConfig verifies that the ControllerPodConfig is valid.

Package podcfg imports 20 packages (graph). Updated 2020-08-11. Refresh now. Tools for package owners.