Skip to content

Commit

Permalink
rename TrustedCAsConfigmap to PrivateCAsConfigmap
Browse files Browse the repository at this point in the history
  • Loading branch information
laverya committed Sep 13, 2024
1 parent 249371c commit cb48ec7
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion cmd/kots/cli/admin-console-generate-manifests.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func AdminGenerateManifestsCmd() *cobra.Command {
IsOpenShift: isOpenShift,
IsGKEAutopilot: isGKEAutopilot,
RegistryConfig: registryConfig,
TrustedCAsConfigmap: v.GetString("private-ca-configmap"),
PrivateCAsConfigmap: v.GetString("private-ca-configmap"),
}
adminConsoleFiles, err := upstream.GenerateAdminConsoleFiles(renderDir, options)
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion cmd/kots/cli/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ func InstallCmd() *cobra.Command {
RequestedChannelSlug: preferredChannelSlug,
AdditionalLabels: additionalLabels,
AdditionalAnnotations: additionalAnnotations,
TrustedCAsConfigmap: v.GetString("private-ca-configmap"),
PrivateCAsConfigmap: v.GetString("private-ca-configmap"),

RegistryConfig: *registryConfig,

Expand Down
20 changes: 10 additions & 10 deletions pkg/kotsadm/objects/kotsadm_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -344,14 +344,14 @@ func KotsadmDeployment(deployOptions types.DeployOptions) (*appsv1.Deployment, e
})
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
env = append(env, corev1.EnvVar{
Name: "SSL_CERT_DIR",
Value: "/certs",
})
env = append(env, corev1.EnvVar{
Name: "SSL_CERT_CONFIGMAP",
Value: deployOptions.TrustedCAsConfigmap,
Value: deployOptions.PrivateCAsConfigmap,
})
}

Expand Down Expand Up @@ -393,13 +393,13 @@ func KotsadmDeployment(deployOptions types.DeployOptions) (*appsv1.Deployment, e
},
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
volumes = append(volumes, corev1.Volume{
Name: "kotsadm-private-cas",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: deployOptions.TrustedCAsConfigmap,
Name: deployOptions.PrivateCAsConfigmap,
},
},
},
Expand All @@ -417,7 +417,7 @@ func KotsadmDeployment(deployOptions types.DeployOptions) (*appsv1.Deployment, e
},
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
volumeMounts = append(volumeMounts, corev1.VolumeMount{
Name: "kotsadm-private-cas",
MountPath: "/certs",
Expand Down Expand Up @@ -882,14 +882,14 @@ func KotsadmStatefulSet(deployOptions types.DeployOptions, size resource.Quantit
})
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
env = append(env, corev1.EnvVar{
Name: "SSL_CERT_DIR",
Value: "/certs",
})
env = append(env, corev1.EnvVar{
Name: "SSL_CERT_CONFIGMAP",
Value: deployOptions.TrustedCAsConfigmap,
Value: deployOptions.PrivateCAsConfigmap,
})
}

Expand Down Expand Up @@ -944,13 +944,13 @@ func KotsadmStatefulSet(deployOptions types.DeployOptions, size resource.Quantit
},
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
volumes = append(volumes, corev1.Volume{
Name: "kotsadm-private-cas",
VolumeSource: corev1.VolumeSource{
ConfigMap: &corev1.ConfigMapVolumeSource{
LocalObjectReference: corev1.LocalObjectReference{
Name: deployOptions.TrustedCAsConfigmap,
Name: deployOptions.PrivateCAsConfigmap,
},
},
},
Expand All @@ -972,7 +972,7 @@ func KotsadmStatefulSet(deployOptions types.DeployOptions, size resource.Quantit
},
}

if deployOptions.TrustedCAsConfigmap != "" {
if deployOptions.PrivateCAsConfigmap != "" {
volumeMounts = append(volumeMounts, corev1.VolumeMount{
Name: "kotsadm-private-cas",
MountPath: "/certs",
Expand Down
2 changes: 1 addition & 1 deletion pkg/kotsadm/types/deployoptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ type DeployOptions struct {
RequestedChannelSlug string
AdditionalAnnotations map[string]string
AdditionalLabels map[string]string
TrustedCAsConfigmap string
PrivateCAsConfigmap string

IdentityConfig kotsv1beta1.IdentityConfig
IngressConfig kotsv1beta1.IngressConfig
Expand Down
8 changes: 4 additions & 4 deletions pkg/upstream/admin-console.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type UpstreamSettings struct {
MigrateToMinioXl bool
CurrentMinioImage string
AdditionalNamespaces []string
TrustedCAsConfigmap string
PrivateCAsConfigmap string

RegistryConfig kotsadmtypes.RegistryConfig
}
Expand All @@ -64,7 +64,7 @@ func GenerateAdminConsoleFiles(renderDir string, options types.WriteOptions) ([]
IsMinimalRBAC: options.IsMinimalRBAC,
AdditionalNamespaces: options.AdditionalNamespaces,
RegistryConfig: options.RegistryConfig,
TrustedCAsConfigmap: options.TrustedCAsConfigmap,
PrivateCAsConfigmap: options.PrivateCAsConfigmap,
}
return generateNewAdminConsoleFiles(settings)
}
Expand All @@ -86,7 +86,7 @@ func GenerateAdminConsoleFiles(renderDir string, options types.WriteOptions) ([]
IsMinimalRBAC: options.IsMinimalRBAC,
AdditionalNamespaces: options.AdditionalNamespaces,
RegistryConfig: options.RegistryConfig,
TrustedCAsConfigmap: options.TrustedCAsConfigmap,
PrivateCAsConfigmap: options.PrivateCAsConfigmap,
}
if err := loadUpstreamSettingsFromFiles(settings, renderDir, existingFiles); err != nil {
return nil, errors.Wrap(err, "failed to find existing settings")
Expand Down Expand Up @@ -194,7 +194,7 @@ func generateNewAdminConsoleFiles(settings *UpstreamSettings) ([]types.UpstreamF
IsMinimalRBAC: settings.IsMinimalRBAC,
AdditionalNamespaces: settings.AdditionalNamespaces,
RegistryConfig: settings.RegistryConfig,
TrustedCAsConfigmap: settings.TrustedCAsConfigmap,
PrivateCAsConfigmap: settings.PrivateCAsConfigmap,
}

if deployOptions.SharedPasswordBcrypt == "" && deployOptions.SharedPassword == "" {
Expand Down
2 changes: 1 addition & 1 deletion pkg/upstream/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ type WriteOptions struct {
SharedPassword string
IsOpenShift bool
IsGKEAutopilot bool
TrustedCAsConfigmap string
PrivateCAsConfigmap string

RegistryConfig kotsadmtypes.RegistryConfig
}
Expand Down

0 comments on commit cb48ec7

Please sign in to comment.