config

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Copyright paskal.maksim@gmail.com Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion

func GetVersion() string

func Load

func Load() error

func Validate

func Validate() error

Types

type ConfigMap

type ConfigMap struct {
	Name string
}

type Deployment

type Deployment struct {
	Name        string
	MinReplicas int32
	Hpa         *Hpa
	Pdb         *Pdb
}

func (*Deployment) GetHpa

func (d *Deployment) GetHpa(values *Type) Hpa

func (*Deployment) GetMinReplicas

func (d *Deployment) GetMinReplicas(values *Type) int32

func (*Deployment) GetPdb

func (d *Deployment) GetPdb(values *Type) Pdb

type Hpa

type Hpa struct {
	Enabled            bool
	MinReplicas        int32
	MaxReplicas        int32
	AverageUtilization int32
}

type Pdb

type Pdb struct {
	Enabled      bool
	MinAvailable int
}

type Service

type Service struct {
	Name string
}

type Type

type Type struct {
	// version spec
	Version types.Version
	// name blue green deployment, defaults to first deployment
	Name string
	// namespace of deployment
	Namespace string
	// environment of deployment
	Environment string
	// HorizontalPodAutoscaler spec
	Hpa Hpa
	// PodDisruptionBudget spec
	Pdb Pdb
	// replicas to set for new deployments
	MinReplicas int32
	// flag to create new services with new version
	CreateService bool
	// flag to delete origin deployment,configmaps after successful deployment
	DeleteOrigins bool
	// interval between pod checks
	PodCheckIntervalSeconds int
	// max time to wait for pods to be ready
	PodCheckMaxSeconds int
	// deployments spec
	Deployments []*Deployment
	// services spec
	Services []*Service
	// configmaps spec
	ConfigMaps []*ConfigMap
	// WebHook spec
	WebHooks []*WebHook
}

func Get

func Get() *Type

func (*Type) String

func (t *Type) String() string

type WebHook

type WebHook struct {
	URL     string
	Headers map[string]string
	Body    string
	Method  string
}

Jump to

Keyboard shortcuts

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