File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -183,6 +183,26 @@ func Validate(manifest *util.DynamicYaml) error {
183183 }
184184 }
185185
186+ domain := manifest .GetValue ("application.domain" )
187+ if domain == nil {
188+ return & ParamsError {Key : "application.domain" , ShortKey : "domain" , ErrorType : "missing" }
189+ }
190+ if domain .Value == "" {
191+ return & ParamsError {Key : "application.domain" , ShortKey : "domain" , ErrorType : "blank" }
192+ }
193+
194+ fqdn := manifest .GetValue ("application.fqdn" )
195+ if fqdn == nil {
196+ return & ParamsError {Key : "application.fqdn" , ShortKey : "fqdn" , ErrorType : "missing" }
197+ }
198+ if fqdn .Value == "" {
199+ return & ParamsError {Key : "application.fqdn" , ShortKey : "fqdn" , ErrorType : "blank" }
200+ }
201+
202+ if ! strings .HasSuffix (fqdn .Value , domain .Value ) {
203+ return fmt .Errorf ("application.fqdn does not end in application.domain" )
204+ }
205+
186206 flatMap := manifest .FlattenToKeyValue (util .AppendDotFlatMapKeyFormatter )
187207 mapKeys := []string {}
188208 for key := range flatMap {
You can’t perform that action at this time.
0 commit comments