Skip to content

Commit

Permalink
types: add ClusterDomain helper for InstallConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavdahiya committed Feb 15, 2019
1 parent 6538030 commit 1ab1cd3
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions pkg/types/installconfig.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package types

import (
"fmt"

"github.com/openshift/installer/pkg/ipnet"
"github.com/openshift/installer/pkg/types/aws"
"github.com/openshift/installer/pkg/types/libvirt"
Expand Down Expand Up @@ -64,6 +66,11 @@ type InstallConfig struct {
PullSecret string `json:"pullSecret"`
}

// ClusterDomain returns the DNS domain that all records for a cluster must belong to.
func (c *InstallConfig) ClusterDomain() string {
return fmt.Sprintf("%s.%s", c.ObjectMeta.Name, c.BaseDomain)
}

// Platform is the configuration for the specific platform upon which to perform
// the installation. Only one of the platform configuration should be set.
type Platform struct {
Expand Down

0 comments on commit 1ab1cd3

Please sign in to comment.