github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/internal/operator/boom/application/applications/reconciling/helm/default.go (about) 1 package helm 2 3 import ( 4 "strings" 5 6 "github.com/caos/orbos/pkg/kubernetes/k8s" 7 corev1 "k8s.io/api/core/v1" 8 "k8s.io/apimachinery/pkg/api/resource" 9 ) 10 11 func DefaultDexValues(imageTags map[string]string) *Dex { 12 return &Dex{ 13 Enabled: true, 14 Name: "dex-server", 15 Image: &Image{ 16 Repository: "quay.io/dexidp/dex", 17 Tag: imageTags["quay.io/dexidp/dex"], 18 ImagePullPolicy: "IfNotPresent", 19 }, 20 ServiceAccount: &ServiceAccount{ 21 Create: true, 22 Name: "argocd-dex-server", 23 }, 24 VolumeMounts: []*VolumeMount{ 25 &VolumeMount{ 26 Name: "static-files", 27 MountPath: "/shared", 28 }, 29 }, 30 Volumes: []*Volume{ 31 &Volume{ 32 Name: "static-files", 33 EmptyDir: struct{}{}, 34 }, 35 }, 36 NodeSelector: map[string]string{}, 37 ContainerPortHTTP: 5556, 38 ServicePortHTTP: 5556, 39 ContainerPortGrpc: 5557, 40 ServicePortGrpc: 5557, 41 } 42 } 43 44 func DefaultValues(imageTags map[string]string, image string) *Values { 45 knownHosts := []string{ 46 "bitbucket.org ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAubiN81eDcafrgMeLzaFPsw2kNvEcqTKl/VqLat/MaB33pZy0y3rJZtnqwR2qOOvbwKZYKiEO1O6VqNEBxKvJJelCq0dTXWT5pbO2gDXC6h6QDXCaHo6pOHGPUy+YBaGQRGuSusMEASYiWunYN0vCAI8QaXnWMXNMdFP3jHAJH0eDsoiGnLPBlBp4TNm6rYI74nMzgz3B9IikW4WVK+dc8KZJZWYjAuORU3jc1c/NPskD2ASinf8v3xnfXeukU0sJ5N6m5E8VLjObPEO+mN2t/FZTMZLiFqPWc/ALSqnMnnhwrNi2rbfg/rd/IpL8Le3pSBne8+seeFVBoGqzHM9yXw==", 47 "github.com ssh-rsa AAAA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zGJOfGJ4NakVyIzf1rXYd4d7wo6jBlkLvCA4odBlL0mDUyZ0/QUfTTqeu+tm22gOsv+VrVTMk6vwRU75gY/y9ut5Mb3bR5BV58dKXyq9A9UeB5Cakehn5Zgm6x1mKoVyf+FFn26iYqXJRgzIZZcZ5V6hrE0Qg39kZm4az48o0AUbf6Sp4SLdvnuMa2sVNwHBboS7EJkm57XQPVU3/QpyNLHbWDdzwtrlS+ez30S3AdYhLKEOxAG8weOnyrtLJAUen9mTkol8oII1edf7mWWbWVf0nBmly21+nZcmCTISQBtdcyPaEno7fFQMDD26/s0lfKob4Kw8H", 52 "vs-ssh.visualstudio.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC7Hr1oTWqNqOlzGJOfGJ4NakVyIzf1rXYd4d7wo6jBlkLvCA4odBlL0mDUyZ0/QUfTTqeu+tm22gOsv+VrVTMk6vwRU75gY/y9ut5Mb3bR5BV58dKXyq9A9UeB5Cakehn5Zgm6x1mKoVyf+FFn26iYqXJRgzIZZcZ5V6hrE0Qg39kZm4az48o0AUbf6Sp4SLdvnuMa2sVNwHBboS7EJkm57XQPVU3/QpyNLHbWDdzwtrlS+ez30S3AdYhLKEOxAG8weOnyrtLJAUen9mTkol8oII1edf7mWWbWVf0nBmly21+nZcmCTISQBtdcyPaEno7fFQMDD26/s0lfKob4Kw8H", 53 } 54 55 knownHostsStr := "" 56 for _, v := range knownHosts { 57 if knownHostsStr == "" { 58 knownHostsStr = v 59 } else { 60 knownHostsStr = strings.Join([]string{knownHostsStr, v}, "\n") 61 } 62 } 63 64 values := &Values{ 65 FullnameOverride: "argocd", 66 InstallCRDs: true, 67 Global: &Global{ 68 Image: &Image{ 69 Repository: image, 70 Tag: imageTags[image], 71 ImagePullPolicy: "IfNotPresent", 72 }, 73 }, 74 Controller: &Controller{ 75 Image: &Image{ 76 Repository: image, 77 Tag: imageTags[image], 78 ImagePullPolicy: "IfNotPresent", 79 }, 80 Name: "application-controller", 81 Args: &Args{ 82 StatusProcessors: "20", 83 OperationProcessors: "10", 84 }, 85 LogLevel: "info", 86 ContainerPort: 8082, 87 ReadinessProbe: &ReadinessProbe{ 88 FailureThreshold: 3, 89 InitialDelaySeconds: 10, 90 PeriodSeconds: 10, 91 SuccessThreshold: 1, 92 TimeoutSeconds: 1, 93 }, 94 LivenessProbe: &LivenessProbe{ 95 FailureThreshold: 3, 96 InitialDelaySeconds: 10, 97 PeriodSeconds: 10, 98 SuccessThreshold: 1, 99 TimeoutSeconds: 1, 100 }, 101 Service: &Service{ 102 Port: 8082, 103 }, 104 ServiceAccount: &ServiceAccount{ 105 Create: true, 106 Name: "argocd-application-controller", 107 }, 108 Metrics: &Metrics{ 109 Enabled: true, 110 Service: &MetricsService{ 111 ServicePort: 8082, 112 }, 113 ServiceMonitor: &ServiceMonitor{ 114 Enabled: false, 115 }, 116 Rules: &Rules{ 117 Enabled: false, 118 }, 119 }, 120 ClusterAdminAccess: &ClusterAdminAccess{ 121 Enabled: true, 122 }, 123 NodeSelector: map[string]string{}, 124 Resources: &k8s.Resources{ 125 Limits: corev1.ResourceList{ 126 corev1.ResourceCPU: resource.MustParse("100m"), 127 corev1.ResourceMemory: resource.MustParse("256Mi"), 128 }, 129 Requests: corev1.ResourceList{ 130 corev1.ResourceCPU: resource.MustParse("50m"), 131 corev1.ResourceMemory: resource.MustParse("128Mi"), 132 }, 133 }, 134 }, 135 Dex: &Dex{ 136 Enabled: false, 137 ServiceAccount: &ServiceAccount{ 138 Create: false, 139 Name: "argocd-dex-server", 140 }, 141 NodeSelector: map[string]string{}, 142 Resources: &k8s.Resources{ 143 Limits: corev1.ResourceList{ 144 corev1.ResourceCPU: resource.MustParse("100m"), 145 corev1.ResourceMemory: resource.MustParse("256Mi"), 146 }, 147 Requests: corev1.ResourceList{ 148 corev1.ResourceCPU: resource.MustParse("50m"), 149 corev1.ResourceMemory: resource.MustParse("128Mi"), 150 }, 151 }, 152 }, 153 Redis: &Redis{ 154 Enabled: true, 155 Name: "redis", 156 Image: &Image{ 157 Repository: "redis", 158 Tag: imageTags["redis"], 159 ImagePullPolicy: "IfNotPresent", 160 }, 161 ContainerPort: 6379, 162 ServicePort: 6379, 163 NodeSelector: map[string]string{}, 164 Resources: &k8s.Resources{ 165 Limits: corev1.ResourceList{ 166 corev1.ResourceCPU: resource.MustParse("100m"), 167 corev1.ResourceMemory: resource.MustParse("256Mi"), 168 }, 169 Requests: corev1.ResourceList{ 170 corev1.ResourceCPU: resource.MustParse("50m"), 171 corev1.ResourceMemory: resource.MustParse("128Mi"), 172 }, 173 }, 174 }, 175 RedisHA: &RedisHA{ 176 Enabled: false, 177 Exporter: &Exporter{Enabled: false}, 178 PersistenteVolume: &PV{Enabled: false}, 179 Redis: &RedisHAC{ 180 MasterGroupName: "argocd", 181 Config: &RedisHAConfig{Save: "\"\\\"\\\"\""}, 182 }, 183 HAProxy: &HAProxy{ 184 Enabled: false, 185 Metrics: &HAProxyMetrics{Enabled: false}, 186 }, 187 }, 188 Server: &Server{ 189 Image: &Image{ 190 Repository: image, 191 Tag: imageTags[image], 192 ImagePullPolicy: "IfNotPresent", 193 }, 194 Name: "server", 195 LogLevel: "info", 196 ContainerPort: 8080, 197 ReadinessProbe: &ReadinessProbe{ 198 FailureThreshold: 3, 199 InitialDelaySeconds: 10, 200 PeriodSeconds: 10, 201 SuccessThreshold: 1, 202 TimeoutSeconds: 1, 203 }, 204 LivenessProbe: &LivenessProbe{ 205 FailureThreshold: 3, 206 InitialDelaySeconds: 10, 207 PeriodSeconds: 10, 208 SuccessThreshold: 1, 209 TimeoutSeconds: 1, 210 }, 211 Certificate: &Certificate{ 212 Enabled: false, 213 }, 214 Service: &ServerService{ 215 Type: "ClusterIP", 216 ServicePortHTTP: 80, 217 ServicePortHTTPS: 443, 218 }, 219 Metrics: &Metrics{ 220 Enabled: true, 221 Service: &MetricsService{ 222 ServicePort: 8083, 223 }, 224 ServiceMonitor: &ServiceMonitor{ 225 Enabled: false, 226 }, 227 }, 228 ServiceAccount: &ServiceAccount{ 229 Create: true, 230 Name: "argocd-server", 231 }, 232 Ingress: &Ingress{ 233 Enabled: false, 234 }, 235 Route: &Route{ 236 Enabled: false, 237 }, 238 Config: &Config{ 239 URL: "https://argocd.example.com", 240 ApplicationInstanceLabelKey: "argocd.argoproj.io/instance", 241 }, 242 NodeSelector: map[string]string{}, 243 Resources: &k8s.Resources{ 244 Limits: corev1.ResourceList{ 245 corev1.ResourceCPU: resource.MustParse("100m"), 246 corev1.ResourceMemory: resource.MustParse("256Mi"), 247 }, 248 Requests: corev1.ResourceList{ 249 corev1.ResourceCPU: resource.MustParse("50m"), 250 corev1.ResourceMemory: resource.MustParse("128Mi"), 251 }, 252 }, 253 }, 254 RepoServer: &RepoServer{ 255 Image: &Image{ 256 Repository: image, 257 Tag: imageTags[image], 258 ImagePullPolicy: "IfNotPresent", 259 }, 260 Name: "repo-server", 261 LogLevel: "info", 262 ContainerPort: 8081, 263 ReadinessProbe: &ReadinessProbe{ 264 FailureThreshold: 3, 265 InitialDelaySeconds: 10, 266 PeriodSeconds: 10, 267 SuccessThreshold: 1, 268 TimeoutSeconds: 1, 269 }, 270 LivenessProbe: &LivenessProbe{ 271 FailureThreshold: 3, 272 InitialDelaySeconds: 10, 273 PeriodSeconds: 10, 274 SuccessThreshold: 1, 275 TimeoutSeconds: 1, 276 }, 277 Service: &Service{ 278 Port: 8081, 279 }, 280 Metrics: &Metrics{ 281 Enabled: true, 282 Service: &MetricsService{ 283 ServicePort: 8084, 284 }, 285 ServiceMonitor: &ServiceMonitor{ 286 Enabled: false, 287 }, 288 }, 289 ServiceAccount: &ServiceAccount{ 290 Create: false, 291 }, 292 NodeSelector: map[string]string{}, 293 Resources: &k8s.Resources{ 294 Limits: corev1.ResourceList{ 295 corev1.ResourceCPU: resource.MustParse("100m"), 296 corev1.ResourceMemory: resource.MustParse("256Mi"), 297 }, 298 Requests: corev1.ResourceList{ 299 corev1.ResourceCPU: resource.MustParse("50m"), 300 corev1.ResourceMemory: resource.MustParse("128Mi"), 301 }, 302 }, 303 }, 304 Configs: &Configs{ 305 KnownHosts: &Data{ 306 Data: map[string]string{ 307 "ssh_known_hosts": knownHostsStr, 308 }, 309 }, 310 Secret: &Secret{ 311 CreateSecret: true, 312 }, 313 }, 314 } 315 316 return values 317 }