-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adapt shoot_cert_service actuator for deployment on runtime
- Loading branch information
1 parent
479665d
commit c11d626
Showing
4 changed files
with
179 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,7 @@ var _ = Describe("Validation", func() { | |
}, | ||
} | ||
) | ||
DescribeTable("#ValidateCertConfig", | ||
DescribeTable("#ValidateCertConfigShoot", | ||
func(config service.CertConfig, match gomegatypes.GomegaMatcher) { | ||
err := validation.ValidateCertConfig(&config, cluster) | ||
Expect(err).To(match) | ||
|
@@ -291,4 +291,62 @@ var _ = Describe("Validation", func() { | |
})), | ||
)), | ||
) | ||
DescribeTable("#ValidateCertConfigRuntimeCluster", | ||
func(config service.CertConfig, match gomegatypes.GomegaMatcher) { | ||
err := validation.ValidateCertConfig(&config, nil) | ||
Expect(err).To(match) | ||
}, | ||
Entry("No issuers", service.CertConfig{}, BeEmpty()), | ||
Entry("Unsupported issuer", service.CertConfig{ | ||
Issuers: []service.IssuerConfig{ | ||
{ | ||
Name: "issuer", | ||
Server: "https://acme-v02.api.letsencrypt.org/directory", | ||
Email: "[email protected]", | ||
}, | ||
}, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeForbidden), | ||
"Field": Equal("issuers"), | ||
})), | ||
)), | ||
Entry("Unsupported DNSChallengeOnShoot", service.CertConfig{ | ||
DNSChallengeOnShoot: &service.DNSChallengeOnShoot{ | ||
Enabled: true, | ||
Namespace: "kube-system", | ||
}, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeForbidden), | ||
"Field": Equal("dnsChallengeOnShoot"), | ||
})), | ||
)), | ||
Entry("Unsupported PrecheckNameservers", service.CertConfig{ | ||
PrecheckNameservers: &nameservers, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeForbidden), | ||
"Field": Equal("precheckNameservers"), | ||
})), | ||
)), | ||
Entry("Unsupported ShootIssuer", service.CertConfig{ | ||
ShootIssuers: &service.ShootIssuers{ | ||
Enabled: true, | ||
}, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeForbidden), | ||
"Field": Equal("shootIssuers"), | ||
})), | ||
)), | ||
Entry("Unsupported Alerting", service.CertConfig{ | ||
Alerting: &service.Alerting{}, | ||
}, ConsistOf( | ||
PointTo(MatchFields(IgnoreExtras, Fields{ | ||
"Type": Equal(field.ErrorTypeForbidden), | ||
"Field": Equal("alerting"), | ||
})), | ||
)), | ||
) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters