github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/reconciling/helm/values.go (about)

     1  package helm
     2  
     3  import (
     4  	"github.com/caos/orbos/pkg/kubernetes/k8s"
     5  )
     6  
     7  type Image struct {
     8  	Repository      string `yaml:"repository"`
     9  	Tag             string `yaml:"tag"`
    10  	ImagePullPolicy string `yaml:"imagePullPolicy"`
    11  }
    12  type Global struct {
    13  	Image           *Image   `yaml:"image"`
    14  	SecurityContext struct{} `yaml:"securityContext"`
    15  }
    16  type Args struct {
    17  	StatusProcessors    string `yaml:"statusProcessors"`
    18  	OperationProcessors string `yaml:"operationProcessors"`
    19  }
    20  
    21  type ReadinessProbe struct {
    22  	FailureThreshold    int `yaml:"failureThreshold"`
    23  	InitialDelaySeconds int `yaml:"initialDelaySeconds"`
    24  	PeriodSeconds       int `yaml:"periodSeconds"`
    25  	SuccessThreshold    int `yaml:"successThreshold"`
    26  	TimeoutSeconds      int `yaml:"timeoutSeconds"`
    27  }
    28  type LivenessProbe struct {
    29  	FailureThreshold    int `yaml:"failureThreshold"`
    30  	InitialDelaySeconds int `yaml:"initialDelaySeconds"`
    31  	PeriodSeconds       int `yaml:"periodSeconds"`
    32  	SuccessThreshold    int `yaml:"successThreshold"`
    33  	TimeoutSeconds      int `yaml:"timeoutSeconds"`
    34  }
    35  type Service struct {
    36  	Annotations map[string]string `yaml:"annotations"`
    37  	Labels      map[string]string `yaml:"labels"`
    38  	Port        int               `yaml:"port"`
    39  }
    40  type ServiceAccount struct {
    41  	Create bool   `yaml:"create"`
    42  	Name   string `yaml:"name"`
    43  }
    44  type MetricsService struct {
    45  	Annotations map[string]string `yaml:"annotations"`
    46  	Labels      map[string]string `yaml:"labels"`
    47  	ServicePort int               `yaml:"servicePort"`
    48  }
    49  type ServiceMonitor struct {
    50  	Enabled bool `yaml:"enabled"`
    51  }
    52  type Rules struct {
    53  	Enabled bool          `yaml:"enabled"`
    54  	Spec    []interface{} `yaml:"spec"`
    55  }
    56  type Metrics struct {
    57  	Enabled        bool            `yaml:"enabled"`
    58  	Service        *MetricsService `yaml:"service"`
    59  	ServiceMonitor *ServiceMonitor `yaml:"serviceMonitor"`
    60  	Rules          *Rules          `yaml:"rules"`
    61  }
    62  type ClusterAdminAccess struct {
    63  	Enabled bool `yaml:"enabled"`
    64  }
    65  type ConfigMap struct {
    66  	Name        string `yaml:"name,omitempty"`
    67  	DefaultMode int    `yaml:"defaultMode,omitempty"`
    68  }
    69  type VolumeSecret struct {
    70  	SecretName  string  `yaml:"secretName,omitempty"`
    71  	Items       []*Item `yaml:"items,omitempty"`
    72  	DefaultMode int     `yaml:"defaultMode"`
    73  }
    74  
    75  type Item struct {
    76  	Key  string `yaml:"key"`
    77  	Path string `yaml:"path"`
    78  }
    79  
    80  type Volume struct {
    81  	Secret    *VolumeSecret `yaml:"secret,omitempty"`
    82  	ConfigMap *ConfigMap    `yaml:"configMap,omitempty"`
    83  	Name      string        `yaml:"name"`
    84  	EmptyDir  struct{}      `yaml:"emptyDir,omitempty"`
    85  }
    86  
    87  type VolumeMount struct {
    88  	Name      string `yaml:"name"`
    89  	MountPath string `yaml:"mountPath,omitempty"`
    90  	SubPath   string `yaml:"subPath,omitempty"`
    91  	ReadOnly  bool   `yaml:"readOnly,omitempty"`
    92  }
    93  type Controller struct {
    94  	Name               string              `yaml:"name"`
    95  	Image              *Image              `yaml:"image"`
    96  	Args               *Args               `yaml:"args"`
    97  	LogLevel           string              `yaml:"logLevel"`
    98  	ExtraArgs          []string            `yaml:"extraArgs"`
    99  	Env                []interface{}       `yaml:"env"`
   100  	PodAnnotations     map[string]string   `yaml:"podAnnotations"`
   101  	PodLabels          map[string]string   `yaml:"podLabels"`
   102  	ContainerPort      int                 `yaml:"containerPort"`
   103  	ReadinessProbe     *ReadinessProbe     `yaml:"readinessProbe"`
   104  	LivenessProbe      *LivenessProbe      `yaml:"livenessProbe"`
   105  	VolumeMounts       []*VolumeMount      `yaml:"volumeMounts"`
   106  	Volumes            []*Volume           `yaml:"volumes"`
   107  	Service            *Service            `yaml:"service"`
   108  	NodeSelector       map[string]string   `yaml:"nodeSelector"`
   109  	Tolerations        k8s.Tolerations     `yaml:"tolerations"`
   110  	Affinity           struct{}            `yaml:"affinity"`
   111  	PriorityClassName  string              `yaml:"priorityClassName"`
   112  	Resources          *k8s.Resources      `yaml:"resources"`
   113  	ServiceAccount     *ServiceAccount     `yaml:"serviceAccount"`
   114  	Metrics            *Metrics            `yaml:"metrics"`
   115  	ClusterAdminAccess *ClusterAdminAccess `yaml:"clusterAdminAccess"`
   116  }
   117  type Dex struct {
   118  	Enabled           bool              `yaml:"enabled"`
   119  	Name              string            `yaml:"name"`
   120  	Image             *Image            `yaml:"image"`
   121  	InitImage         *Image            `yaml:"initImage,omitempty"`
   122  	Env               []interface{}     `yaml:"env"`
   123  	ServiceAccount    *ServiceAccount   `yaml:"serviceAccount"`
   124  	VolumeMounts      []*VolumeMount    `yaml:"volumeMounts"`
   125  	Volumes           []*Volume         `yaml:"volumes"`
   126  	ContainerPortHTTP int               `yaml:"containerPortHttp"`
   127  	ServicePortHTTP   int               `yaml:"servicePortHttp"`
   128  	ContainerPortGrpc int               `yaml:"containerPortGrpc"`
   129  	ServicePortGrpc   int               `yaml:"servicePortGrpc"`
   130  	NodeSelector      map[string]string `yaml:"nodeSelector"`
   131  	Tolerations       k8s.Tolerations   `yaml:"tolerations"`
   132  	Affinity          struct{}          `yaml:"affinity"`
   133  	PriorityClassName string            `yaml:"priorityClassName"`
   134  	Resources         *k8s.Resources    `yaml:"resources"`
   135  }
   136  
   137  type Redis struct {
   138  	Enabled           bool              `yaml:"enabled"`
   139  	Name              string            `yaml:"name"`
   140  	Image             *Image            `yaml:"image"`
   141  	ContainerPort     int               `yaml:"containerPort"`
   142  	ServicePort       int               `yaml:"servicePort"`
   143  	Env               []interface{}     `yaml:"env"`
   144  	NodeSelector      map[string]string `yaml:"nodeSelector"`
   145  	Tolerations       k8s.Tolerations   `yaml:"tolerations"`
   146  	Affinity          struct{}          `yaml:"affinity"`
   147  	PriorityClassName string            `yaml:"priorityClassName"`
   148  	Resources         *k8s.Resources    `yaml:"resources"`
   149  	VolumeMounts      []*VolumeMount    `yaml:"volumeMounts"`
   150  	Volumes           []*Volume         `yaml:"volumes"`
   151  }
   152  type Certificate struct {
   153  	Enabled         bool          `yaml:"enabled"`
   154  	Domain          string        `yaml:"domain"`
   155  	Issuer          struct{}      `yaml:"issuer"`
   156  	AdditionalHosts []interface{} `yaml:"additionalHosts"`
   157  }
   158  type ServerService struct {
   159  	Annotations      map[string]string `yaml:"annotations"`
   160  	Labels           map[string]string `yaml:"labels"`
   161  	Type             string            `yaml:"type"`
   162  	ServicePortHTTP  int               `yaml:"servicePortHttp"`
   163  	ServicePortHTTPS int               `yaml:"servicePortHttps"`
   164  }
   165  type Ingress struct {
   166  	Enabled     bool              `yaml:"enabled"`
   167  	Annotations map[string]string `yaml:"annotations"`
   168  	Labels      map[string]string `yaml:"labels"`
   169  	Hosts       []interface{}     `yaml:"hosts"`
   170  	Paths       []string          `yaml:"paths"`
   171  	TLS         []interface{}     `yaml:"tls"`
   172  }
   173  
   174  type Route struct {
   175  	Enabled  bool   `yaml:"enabled"`
   176  	Hostname string `yaml:"hostname"`
   177  }
   178  
   179  type Config struct {
   180  	URL                         string `yaml:"url"`
   181  	ApplicationInstanceLabelKey string `yaml:"application.instanceLabelKey"`
   182  	OIDC                        string `yaml:"oidc.config,omitempty"`
   183  	Dex                         string `yaml:"dex.config,omitempty"`
   184  	Repositories                string `yaml:"repositories,omitempty"`
   185  	RepositoryCredentials       string `yaml:"repository.credentials,omitempty"`
   186  	ConfigManagementPlugins     string `yaml:"configManagementPlugins,omitempty"`
   187  }
   188  
   189  type Server struct {
   190  	Name                   string            `yaml:"name"`
   191  	Image                  *Image            `yaml:"image"`
   192  	ExtraArgs              []string          `yaml:"extraArgs"`
   193  	Env                    []interface{}     `yaml:"env"`
   194  	LogLevel               string            `yaml:"logLevel"`
   195  	PodAnnotations         map[string]string `yaml:"podAnnotations"`
   196  	PodLabels              map[string]string `yaml:"podLabels"`
   197  	ContainerPort          int               `yaml:"containerPort"`
   198  	ReadinessProbe         *ReadinessProbe   `yaml:"readinessProbe"`
   199  	LivenessProbe          *LivenessProbe    `yaml:"livenessProbe"`
   200  	VolumeMounts           []*VolumeMount    `yaml:"volumeMounts"`
   201  	Volumes                []*Volume         `yaml:"volumes"`
   202  	NodeSelector           map[string]string `yaml:"nodeSelector"`
   203  	Tolerations            k8s.Tolerations   `yaml:"tolerations"`
   204  	Affinity               struct{}          `yaml:"affinity"`
   205  	PriorityClassName      string            `yaml:"priorityClassName"`
   206  	Resources              *k8s.Resources    `yaml:"resources"`
   207  	Certificate            *Certificate      `yaml:"certificate"`
   208  	Service                *ServerService    `yaml:"service"`
   209  	Metrics                *Metrics          `yaml:"metrics"`
   210  	ServiceAccount         *ServiceAccount   `yaml:"serviceAccount"`
   211  	Ingress                *Ingress          `yaml:"ingress"`
   212  	Route                  *Route            `yaml:"route"`
   213  	Config                 *Config           `yaml:"config"`
   214  	RbacConfig             *RbacConfig       `yaml:"rbacConfig,omitempty"`
   215  	AdditionalApplications []interface{}     `yaml:"additionalApplications"`
   216  	AdditionalProjects     []interface{}     `yaml:"additionalProjects"`
   217  }
   218  type RbacConfig struct {
   219  	Csv     string `yaml:"policy.csv,omitempty"`
   220  	Default string `yaml:"policy.default,omitempty"`
   221  	Scopes  string `yaml:"scopes,omitempty"`
   222  }
   223  
   224  type RepoServer struct {
   225  	Name              string            `yaml:"name"`
   226  	Image             *Image            `yaml:"image"`
   227  	ExtraArgs         []string          `yaml:"extraArgs"`
   228  	Env               []interface{}     `yaml:"env"`
   229  	LogLevel          string            `yaml:"logLevel"`
   230  	PodAnnotations    map[string]string `yaml:"podAnnotations"`
   231  	PodLabels         map[string]string `yaml:"podLabels"`
   232  	ContainerPort     int               `yaml:"containerPort"`
   233  	ReadinessProbe    *ReadinessProbe   `yaml:"readinessProbe"`
   234  	LivenessProbe     *LivenessProbe    `yaml:"livenessProbe"`
   235  	VolumeMounts      []*VolumeMount    `yaml:"volumeMounts"`
   236  	Volumes           []*Volume         `yaml:"volumes"`
   237  	NodeSelector      map[string]string `yaml:"nodeSelector"`
   238  	Tolerations       k8s.Tolerations   `yaml:"tolerations"`
   239  	Affinity          struct{}          `yaml:"affinity"`
   240  	PriorityClassName string            `yaml:"priorityClassName"`
   241  	Resources         *k8s.Resources    `yaml:"resources"`
   242  	Service           *Service          `yaml:"service"`
   243  	Metrics           *Metrics          `yaml:"metrics"`
   244  	ServiceAccount    *ServiceAccount   `yaml:"serviceAccount"`
   245  }
   246  type Data struct {
   247  	Data map[string]string `yaml:"data"`
   248  }
   249  type Secret struct {
   250  	CreateSecret          bool   `yaml:"createSecret"`
   251  	GithubSecret          string `yaml:"githubSecret"`
   252  	GitlabSecret          string `yaml:"gitlabSecret"`
   253  	BitbucketServerSecret string `yaml:"bitbucketServerSecret"`
   254  	BitbucketUUD          string `yaml:"bitbucketUUÌD"`
   255  	GogsSecret            string `yaml:"gogsSecret"`
   256  	ArgocdServerTLSConfig struct {
   257  	} `yaml:"argocdServerTlsConfig"`
   258  }
   259  type Configs struct {
   260  	KnownHosts *Data   `yaml:"knownHosts"`
   261  	TLSCerts   *Data   `yaml:"tlsCerts"`
   262  	Secret     *Secret `yaml:"secret"`
   263  }
   264  
   265  type RedisHAConfig struct {
   266  	Save string
   267  }
   268  
   269  type RedisHAC struct {
   270  	MasterGroupName string
   271  	Config          *RedisHAConfig
   272  }
   273  
   274  type HAProxyMetrics struct {
   275  	Enabled bool
   276  }
   277  
   278  type HAProxy struct {
   279  	Enabled bool
   280  	Metrics *HAProxyMetrics
   281  }
   282  
   283  type Exporter struct {
   284  	Enabled bool
   285  }
   286  
   287  type RedisHA struct {
   288  	Enabled           bool
   289  	Exporter          *Exporter
   290  	PersistenteVolume *PV
   291  	Redis             *RedisHAC
   292  	HAProxy           *HAProxy
   293  }
   294  
   295  type PV struct {
   296  	Enabled bool
   297  }
   298  
   299  type Values struct {
   300  	NameOverride     string      `yaml:"nameOverride,omitempty"`
   301  	FullnameOverride string      `yaml:"fullnameOverride,omitempty"`
   302  	InstallCRDs      bool        `yaml:"installCRDs"`
   303  	Global           *Global     `yaml:"global"`
   304  	Controller       *Controller `yaml:"controller"`
   305  	Dex              *Dex        `yaml:"dex"`
   306  	Redis            *Redis      `yaml:"redis"`
   307  	RedisHA          *RedisHA    `yaml:"redis-ha"`
   308  	Server           *Server     `yaml:"server"`
   309  	RepoServer       *RepoServer `yaml:"repoServer"`
   310  	Configs          *Configs    `yaml:"configs"`
   311  }