Documentation ¶
Index ¶
- Constants
- func DecryptAES(password string, crypt64 string) (string, error)
- func EncryptAES(password string, plaintext string) (string, error)
- func GetPassword() (string, error)
- func PrintObj(obj runtime.Object, output string) (string, error)
- type App
- func (app *App) GetConfigMap() (configmap *apiv1.ConfigMap, err error)
- func (app *App) GetCronJobs() (crons []*batch.CronJob, err error)
- func (app *App) GetDeployment() (deployment *appsv1.Deployment, err error)
- func (app *App) GetIngress() (ingress []*v1beta1.Ingress, err error)
- func (app *App) GetIngressSecrets() (secrets []*apiv1.Secret)
- func (app *App) GetManifest(outputFormat string, typeOutput ...OutputResource) (manifest string, err error)
- func (app *App) GetNamespace() (namespace *apiv1.Namespace)
- func (app *App) GetObjectMeta(name string) metav1.ObjectMeta
- func (app *App) GetPersistentVolumeClaims() (claims []*apiv1.PersistentVolumeClaim, err error)
- func (app *App) GetReleaseName() string
- func (app *App) GetSecret() (secret *apiv1.Secret, err error)
- func (app *App) GetServices() (services []*apiv1.Service, err error)
- func (app *App) LoadValues(valueFiles ValueFiles, values, stringValues, fileValues []string) ([]byte, error)
- type Ingress
- type IngressCommon
- type OutputResource
- type Service
- type ValueFiles
Constants ¶
const CryptPrefix = "CRYPT#"
CryptPrefix for encrypted values
const NamespaceDefault = apiv1.NamespaceDefault
NamespaceDefault means the object is in the default namespace which is applied when not specified by clients
Variables ¶
This section is empty.
Functions ¶
func DecryptAES ¶
DecryptAES base64 string encoded by the AES-256 CBC
func EncryptAES ¶
EncryptAES text with AES-256 CBC and returns a base64 encoded string
func GetPassword ¶
GetPassword for environment variable $APP2KUBE_PASSWORD
Types ¶
type App ¶
type App struct { Branch string `yaml:"branch"` Common struct { CronjobSuspend bool `yaml:"cronjobSuspend"` DNSPolicy apiv1.DNSPolicy `yaml:"dnsPolicy"` EnableServiceLinks bool `yaml:"enableServiceLinks"` GracePeriod int64 `yaml:"gracePeriod"` Image struct { PullPolicy apiv1.PullPolicy `yaml:"pullPolicy"` PullSecrets string `yaml:"pullSecrets"` Repository string `yaml:"repository"` Tag string `yaml:"tag"` } `yaml:"image"` Ingress struct { IngressCommon } `yaml:"ingress"` MountServiceAccountToken bool `yaml:"mountServiceAccountToken"` NodeSelector map[string]string `yaml:"nodeSelector"` SharedData string `yaml:"sharedData"` Tolerations []apiv1.Toleration `yaml:"tolerations"` } `yaml:"common"` ConfigMap map[string]string `yaml:"configmap"` Cronjob map[string]struct { ConcurrencyPolicy batch.ConcurrencyPolicy `yaml:"concurrencyPolicy"` Container apiv1.Container `yaml:"container"` FailedJobsHistoryLimit int32 `yaml:"failedJobsHistoryLimit"` RestartPolicy apiv1.RestartPolicy `yaml:"restartPolicy"` Schedule string `yaml:"schedule"` SuccessfulJobsHistoryLimit int32 `yaml:"successfulJobsHistoryLimit"` Suspend bool `yaml:"suspend"` } `yaml:"cronjob"` Deployment struct { Containers map[string]apiv1.Container `yaml:"containers"` ReplicaCount int32 `yaml:"replicaCount"` RevisionHistoryLimit int32 `yaml:"revisionHistoryLimit"` Strategy appsv1.DeploymentStrategy `yaml:"strategy"` } `yaml:"deployment"` Env map[string]string `yaml:"env"` Ingress []Ingress `yaml:"ingress"` Labels map[string]string `yaml:"labels"` Name string `yaml:"name"` Namespace string `yaml:"namespace"` Secrets map[string]string `yaml:"secrets"` Service map[string]Service `yaml:"service"` Staging string `yaml:"staging"` Volumes map[string]struct { Spec apiv1.PersistentVolumeClaimSpec `yaml:"spec"` MountPath string `yaml:"mountPath"` } `yaml:"volumes"` }
App instance
func (*App) GetConfigMap ¶
GetConfigMap resource
func (*App) GetCronJobs ¶
GetCronJobs resource
func (*App) GetDeployment ¶
func (app *App) GetDeployment() (deployment *appsv1.Deployment, err error)
GetDeployment resource
func (*App) GetIngress ¶
GetIngress resource
func (*App) GetIngressSecrets ¶
GetIngressSecrets return TLS secrets for ingress
func (*App) GetManifest ¶
func (app *App) GetManifest(outputFormat string, typeOutput ...OutputResource) (manifest string, err error)
GetManifest returns a manifest with the specified resource types
func (*App) GetNamespace ¶
GetNamespace resource
func (*App) GetObjectMeta ¶
func (app *App) GetObjectMeta(name string) metav1.ObjectMeta
GetObjectMeta return App metadata
func (*App) GetPersistentVolumeClaims ¶
func (app *App) GetPersistentVolumeClaims() (claims []*apiv1.PersistentVolumeClaim, err error)
GetPersistentVolumeClaims resource
func (*App) GetServices ¶
GetServices resource
func (*App) LoadValues ¶
func (app *App) LoadValues(valueFiles ValueFiles, values, stringValues, fileValues []string) ([]byte, error)
LoadValues for App
type Ingress ¶
type Ingress struct { IngressCommon Aliases []string `yaml:"aliases"` Host string `yaml:"host"` Letsencrypt bool `yaml:"letsencrypt"` Path string `yaml:"path"` SslRedirect bool `yaml:"sslRedirect"` TLSCrt string `yaml:"tlsCrt"` TLSKey string `yaml:"tlsKey"` TLSSecretName string `yaml:"tlsSecretName"` }
Ingress specification
type IngressCommon ¶ added in v0.2.0
type IngressCommon struct { Annotations map[string]string `yaml:"annotations"` Class string `yaml:"class"` ServiceName string `yaml:"serviceName"` ServicePort int32 `yaml:"servicePort"` }
IngressCommon specification
type OutputResource ¶
type OutputResource int
OutputResource type
const ( // OutputAll for all resources (except namespace) OutputAll OutputResource = iota // OutputConfigMap only OutputConfigMap // OutputCronJob only OutputCronJob // OutputDeployment only OutputDeployment // OutputIngress only OutputIngress // OutputNamespace only OutputNamespace // OutputPersistentVolumeClaim only OutputPersistentVolumeClaim // OutputSecret only OutputSecret // OutputService only OutputService )
type Service ¶
type Service struct { ExternalPort int32 `yaml:"externalPort"` InternalPort int32 `yaml:"internalPort"` Port int32 `yaml:"port"` Protocol apiv1.Protocol `yaml:"protocol"` Type apiv1.ServiceType `yaml:"type"` }
Service specification
type ValueFiles ¶
type ValueFiles []string
ValueFiles list
func (*ValueFiles) String ¶
func (v *ValueFiles) String() string