Documentation ¶
Index ¶
- Constants
- func AddDefaultManifestValues(manifest *NaisManifest, application string) error
- func CreateOrUpdateFasitResources(fasit FasitClientAdapter, resources []ExposedResource, ...) ([]int, error)
- func GenerateDeployMessage(deploymentRequest *naisrequest.Deploy, clusterName *string) ([]byte, error)
- func NotifySensuAboutDeploy(deploymentRequest *naisrequest.Deploy, clusterName *string)
- func SafeMarshal(v interface{}) ([]byte, error)
- type Api
- type AppError
- type ApplicationInstancePayload
- type DeployStatus
- type DeploymentResult
- type DeploymentStatusView
- type DeploymentStatusViewer
- type ExposedResource
- type FasitClient
- func (fasit FasitClient) GetFasitApplication(application string) error
- func (fasit FasitClient) GetFasitEnvironmentClass(environmentName string) (string, error)
- func (fasit FasitClient) GetScopedResources(resourcesRequests []ResourceRequest, environment string, application string, ...) (resources []NaisResource, err error)
- type FasitClientAdapter
- type FasitResource
- type FasitResources
- type Field
- type Healthcheck
- type Ingress
- type IstioConfig
- type NaisManifest
- type NaisResource
- func (nr NaisResource) Certificates() map[string][]byte
- func (nr NaisResource) MountPoint(property string) string
- func (nr NaisResource) Properties() map[string]string
- func (nr NaisResource) Secret() map[string]string
- func (nr NaisResource) ToEnvironmentVariable(property string) string
- func (nr NaisResource) ToResourceVariable(property string) string
- type Password
- type Probe
- type PrometheusAlertGroup
- type PrometheusAlertGroups
- type PrometheusAlertRule
- type PrometheusConfig
- type Replicas
- type Resource
- type ResourceList
- type ResourcePayload
- type ResourceRequest
- type ResourceRequirements
- type RestProperties
- type RestResourcePayload
- type Scope
- type ServiceAccountInterface
- type UsedResource
- type ValidationError
- type ValidationErrors
- type WebserviceProperties
- type WebserviceResourcePayload
Constants ¶
View Source
const ( DefaultPortName = "http" )
View Source
const ( RootMountPoint = "/var/run/secrets/naisd.io/" AlertsConfigMapNamespace = "nais" AlertsConfigMapName = "app-rules" )
Variables ¶
This section is empty.
Functions ¶
func AddDefaultManifestValues ¶
func AddDefaultManifestValues(manifest *NaisManifest, application string) error
func CreateOrUpdateFasitResources ¶
func CreateOrUpdateFasitResources(fasit FasitClientAdapter, resources []ExposedResource, hostname, fasitEnvironmentClass, fasitEnvironment string, deploymentRequest naisrequest.Deploy) ([]int, error)
func GenerateDeployMessage ¶
func GenerateDeployMessage(deploymentRequest *naisrequest.Deploy, clusterName *string) ([]byte, error)
func NotifySensuAboutDeploy ¶
func NotifySensuAboutDeploy(deploymentRequest *naisrequest.Deploy, clusterName *string)
func SafeMarshal ¶
Types ¶
type Api ¶
type Api struct { Clientset kubernetes.Interface FasitUrl string ClusterSubdomain string ClusterName string IstioEnabled bool DeploymentStatusViewer DeploymentStatusViewer }
func NewApi ¶
func NewApi(clientset kubernetes.Interface, fasitUrl, clusterDomain, clusterName string, istioEnabled bool, d DeploymentStatusViewer) Api
type ApplicationInstancePayload ¶
type ApplicationInstancePayload struct { Application string `json:"application"` Environment string `json:"environment"` Version string `json:"version"` ExposedResources []Resource `json:"exposedresources"` UsedResources []Resource `json:"usedresources"` ClusterName string `json:"clustername"` Domain string `json:"domain"` }
type DeployStatus ¶
type DeployStatus int
const ( Success DeployStatus = iota InProgress Failed )
func (DeployStatus) String ¶
func (d DeployStatus) String() string
type DeploymentResult ¶
type DeploymentResult struct { Autoscaler *k8sautoscaling.HorizontalPodAutoscaler Ingress *k8sextensions.Ingress Deployment *k8sextensions.Deployment Secret *k8score.Secret Service *k8score.Service Redis *redisapi.RedisFailover AlertsConfigMap *k8score.ConfigMap ServiceAccount *k8score.ServiceAccount }
type DeploymentStatusView ¶
type DeploymentStatusViewer ¶
type DeploymentStatusViewer interface {
DeploymentStatusView(namespace string, deployName string) (DeployStatus, DeploymentStatusView, error)
}
func NewDeploymentStatusViewer ¶
func NewDeploymentStatusViewer(clientset kubernetes.Interface) DeploymentStatusViewer
type ExposedResource ¶
type ExposedResource struct { Alias string ResourceType string `yaml:"resourceType"` Path string Description string WsdlGroupId string `yaml:"wsdlGroupId"` WsdlArtifactId string `yaml:"wsdlArtifactId"` WsdlVersion string `yaml:"wsdlVersion"` SecurityToken string `yaml:"securityToken"` AllZones bool `yaml:"allZones"` }
type FasitClient ¶
func (FasitClient) GetFasitApplication ¶
func (fasit FasitClient) GetFasitApplication(application string) error
func (FasitClient) GetFasitEnvironmentClass ¶
func (fasit FasitClient) GetFasitEnvironmentClass(environmentName string) (string, error)
func (FasitClient) GetScopedResources ¶
func (fasit FasitClient) GetScopedResources(resourcesRequests []ResourceRequest, environment string, application string, zone string) (resources []NaisResource, err error)
type FasitClientAdapter ¶
type FasitClientAdapter interface { GetFasitEnvironmentClass(environmentName string) (string, error) GetFasitApplication(application string) error GetScopedResources(resourcesRequests []ResourceRequest, environment string, application string, zone string) (resources []NaisResource, err error) // contains filtered or unexported methods }
type FasitResource ¶
type FasitResources ¶
type FasitResources struct { Used []UsedResource Exposed []ExposedResource }
type Healthcheck ¶
type IstioConfig ¶
type IstioConfig struct {
Enabled bool
}
type NaisManifest ¶
type NaisManifest struct { Team string Image string Port int Healthcheck Healthcheck PreStopHookPath string `yaml:"preStopHookPath"` Prometheus PrometheusConfig Istio IstioConfig Replicas Replicas Ingress Ingress Resources ResourceRequirements FasitResources FasitResources `yaml:"fasitResources"` LeaderElection bool `yaml:"leaderElection"` Redis bool `yaml:"redis"` WebProxy bool Alerts []PrometheusAlertRule Logformat string Logtransform string }
func GenerateManifest ¶
func GenerateManifest(deploymentRequest naisrequest.Deploy) (naisManifest NaisManifest, err error)
func GetDefaultManifest ¶
func GetDefaultManifest(application string) NaisManifest
type NaisResource ¶
type NaisResource struct {
// contains filtered or unexported fields
}
func FetchFasitResources ¶
func FetchFasitResources(fasit FasitClientAdapter, application string, environment string, zone string, usedResources []UsedResource) (naisresources []NaisResource, err error)
func (NaisResource) Certificates ¶
func (nr NaisResource) Certificates() map[string][]byte
func (NaisResource) MountPoint ¶
func (nr NaisResource) MountPoint(property string) string
func (NaisResource) Properties ¶
func (nr NaisResource) Properties() map[string]string
func (NaisResource) Secret ¶
func (nr NaisResource) Secret() map[string]string
func (NaisResource) ToEnvironmentVariable ¶
func (nr NaisResource) ToEnvironmentVariable(property string) string
func (NaisResource) ToResourceVariable ¶
func (nr NaisResource) ToResourceVariable(property string) string
type PrometheusAlertGroup ¶
type PrometheusAlertGroup struct { Name string Rules []PrometheusAlertRule }
type PrometheusAlertGroups ¶
type PrometheusAlertGroups struct {
Groups []PrometheusAlertGroup
}
type PrometheusAlertRule ¶
type PrometheusConfig ¶
type ResourceList ¶
type ResourcePayload ¶
type ResourcePayload interface{}
type ResourceRequest ¶
func DefaultResourceRequests ¶
func DefaultResourceRequests() []ResourceRequest
type ResourceRequirements ¶
type ResourceRequirements struct { Limits ResourceList Requests ResourceList }
type RestProperties ¶
type RestResourcePayload ¶
type RestResourcePayload struct { Alias string `json:"alias"` Scope Scope `json:"scope"` Type string `json:"type"` Properties RestProperties `json:"properties"` }
type ServiceAccountInterface ¶
type ServiceAccountInterface interface { CreateOrUpdate(name, namespace, team string) (*v1.ServiceAccount, error) Delete(name, namespace string) error }
func NewServiceAccountInterface ¶
func NewServiceAccountInterface(client kubernetes.Interface) ServiceAccountInterface
type UsedResource ¶
type ValidationError ¶
type ValidationErrors ¶
type ValidationErrors struct {
Errors []ValidationError
}
func ValidateManifest ¶
func ValidateManifest(manifest NaisManifest) ValidationErrors
func (ValidationErrors) Error ¶
func (errors ValidationErrors) Error() (s string)
type WebserviceProperties ¶
type WebserviceResourcePayload ¶
type WebserviceResourcePayload struct { Alias string `json:"alias"` Scope Scope `json:"scope"` Type string `json:"type"` Properties WebserviceProperties `json:"properties"` }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.