TODO: add dynamicLabels and dynamicAnnotations by @zhangtao
(cluster *kbappsv1.Cluster, synthesizedComp *component.SynthesizedComponent, configs map[string]string, cmName string, configTemplateSpec kbappsv1.ComponentFileTemplate)
| 277 | // TODO: add dynamicLabels and dynamicAnnotations by @zhangtao |
| 278 | |
| 279 | func BuildConfigMapWithTemplate(cluster *kbappsv1.Cluster, |
| 280 | synthesizedComp *component.SynthesizedComponent, |
| 281 | configs map[string]string, |
| 282 | cmName string, |
| 283 | configTemplateSpec kbappsv1.ComponentFileTemplate) *corev1.ConfigMap { |
| 284 | return builder.NewConfigMapBuilder(cluster.Namespace, cmName). |
| 285 | AddLabelsInMap(synthesizedComp.StaticLabels). |
| 286 | AddLabelsInMap(constant.GetCompLabels(cluster.Name, synthesizedComp.Name)). |
| 287 | AddLabels(constant.CMConfigurationTypeLabelKey, constant.ConfigInstanceType). |
| 288 | AddLabels(constant.CMTemplateNameLabelKey, configTemplateSpec.Template). |
| 289 | AddAnnotationsInMap(synthesizedComp.StaticAnnotations). |
| 290 | AddAnnotations(constant.DisableUpgradeInsConfigurationAnnotationKey, strconv.FormatBool(false)). |
| 291 | SetData(configs). |
| 292 | GetObject() |
| 293 | } |
| 294 | |
| 295 | func BuildCfgManagerContainer(sidecarRenderedParam *cfgcm.CfgManagerBuildParams) (*corev1.Container, error) { |
| 296 | var env []corev1.EnvVar |
no test coverage detected
searching dependent graphs…