Skip to content

Commit 9f32fcc

Browse files
committed
Resolved review comments
1 parent 04fb532 commit 9f32fcc

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

pkg/asset/agent/manifests/common.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,6 @@ func getProxy(ic *agent.OptionalInstallConfig) *aiv1beta1.Proxy {
3030
}
3131
}
3232

33-
func getAdditionalTrustBundle(ic *agent.OptionalInstallConfig) string {
34-
return ic.Config.AdditionalTrustBundle
35-
}
36-
3733
func getObjectMetaNamespace(ic *agent.OptionalInstallConfig) string {
3834
if ic.Config != nil {
3935
return ic.Config.Namespace

pkg/asset/agent/manifests/infraenv.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ func (i *InfraEnv) Generate(dependencies asset.Parents) error {
8181
if installConfig.Config.Proxy != nil {
8282
infraEnv.Spec.Proxy = getProxy(installConfig)
8383
}
84-
if installConfig.Config.AdditionalTrustBundle != "" {
85-
infraEnv.Spec.AdditionalTrustBundle = getAdditionalTrustBundle(installConfig)
84+
if atb := installConfig.Config.AdditionalTrustBundle; atb != "" {
85+
infraEnv.Spec.AdditionalTrustBundle = atb
8686
}
8787

8888
if agentConfig.Config != nil {

pkg/asset/agent/manifests/infraenv_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func TestInfraEnv_Generate(t *testing.T) {
139139
NMStateConfigLabelSelector: metav1.LabelSelector{
140140
MatchLabels: getNMStateConfigLabels(getValidOptionalInstallConfig()),
141141
},
142-
AdditionalTrustBundle: getAdditionalTrustBundle(getAdditionalTrustBundleValidOptionalInstallConfig()),
142+
AdditionalTrustBundle: getAdditionalTrustBundleValidOptionalInstallConfig().Config.AdditionalTrustBundle,
143143
},
144144
},
145145
},

pkg/asset/agent/manifests/util_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ func getProxyValidOptionalInstallConfig() *agent.OptionalInstallConfig {
210210
return validIC
211211
}
212212

213-
// getAdditionalTrustBundleValidOptionalInstallConfig returns a valid optional install config with AdditonalTrustBundle
213+
// getAdditionalTrustBundleValidOptionalInstallConfig returns a valid optional install config with AdditonalTrustBundle.
214214
func getAdditionalTrustBundleValidOptionalInstallConfig() *agent.OptionalInstallConfig {
215215
validIC := getValidOptionalInstallConfig()
216216
validIC.Config.AdditionalTrustBundle = `-----BEGIN CERTIFICATE-----MIIDZTCCAk2gAwIBAgIURbA8lR+5xlJZUoOXK66AHFWd3uswDQYJKoZIhvcNAQELBQAwQjELMAkGA1UEBhMCWFgxFTATBgNVBAcMDERlZmF1bHQgQ2l0eTEcMBoGA1UECgwTRGVmYXVsdCBDb21wYW55IEx0ZDAeFw0yMjA3MDgxOTUzMTVaFw0yMjA4MDcxOTUzMTVaMEIxCzAJBgNVBAYTAlhYMRUwEwYDVQQHDAxEZWZhdWx0IENpdHkxHDAaBgNVBAoME0RlZmF1bHQgQ29tcGFueSBMdGQwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCroH9c2PLWI0O/nBrmKtS2IuReyWaR0DOMJY7C/vc12l9zlH0DxTOUfEtdqRktjVsUn1vIIiFakxd0QLIPcMyKplmbavIBUQp+MZr0pNVX+lwcctbA7FVHEnbWYNVepoV7kZkTVvMXAqFylMXU4gDmuZzIxhVMMxjialJNED+3ngqvX4w34q4KSk1ytaHGwjREIErwPJjv5PK48KVJL2nlCuA+tbxu1r8eVkOUvZlxAuNNXk/Umf3QX5EiUlTtsmRAct6fIUT3jkrsHSS/tZ66EYJ9Q0OBoX2lL/Msmi27OQvA7uYnuqYlwJzU43tCsiip9E9z/UrLcMYyXx3oPJyPAgMBAAGjUzBRMB0GA1UdDgQWBBTIahE8DDT4T1vta6cXVVaRjnel0zAfBgNVHSMEGDAWgBTIahE8DDT4T1vta6cXVVaRjnel0zAPBgNVHRMBAf8EBTADAQH/M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