Skip to content

Commit

Permalink
Support configuration of elasticsearch memory requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Conner committed Jul 20, 2018
1 parent a8f76d5 commit 4179b0a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 2 additions & 0 deletions pkg/oc/bootstrap/docker/openshift/ansible.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ openshift_istio_install_auth={{.IstioInstallAuth}}
openshift_istio_install_launcher={{.IstioInstallLauncher}}
openshift_istio_master_public_url={{.MasterPublicURL}}
{{with .IstioJaegerImageVersion}}openshift_istio_jaeger_image_version={{.}}{{end}}
{{with .IstioElasticsearchMemory}}openshift_istio_elasticsearch_memory={{.}}{{end}}
{{with .LauncherOpenShiftUser}}launcher_openshift_user={{.}}{{end}}
{{with .LauncherOpenShiftPassword}}launcher_openshift_pwd={{.}}{{end}}
{{with .LauncherGitHubUsername}}launcher_github_username={{.}}{{end}}
Expand Down Expand Up @@ -153,6 +154,7 @@ type ansibleIstioInventoryParams struct {
IstioInstallAuth bool
IstioInstallLauncher bool
IstioJaegerImageVersion string
IstioElasticsearchMemory string
LauncherOpenShiftUser string
LauncherOpenShiftPassword string
LauncherGitHubUsername string
Expand Down
8 changes: 6 additions & 2 deletions pkg/oc/bootstrap/docker/openshift/istio.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@ const (
)

// InstallIstio checks whether istio is installed and installs it if not already installed
func (h *Helper) InstallIstio(f *clientcmd.Factory, serverVersion semver.Version, serverIP, publicHostname, oseVersion, istioVersion, istioPrefix, istioJaegerVersion, hostConfigDir, imageStreams string,
installCommunity, installAuth, installLauncher bool, launcherOpenShiftUser, launcherOpenShiftPassword, launcherGitHubUsername, launcherGitHubToken, launcherCatalogGitRepo, launcherCatalogGitBranch, launcherBoosterCatalogFilter string,
func (h *Helper) InstallIstio(f *clientcmd.Factory, serverVersion semver.Version, serverIP,
publicHostname, oseVersion, istioVersion, istioPrefix, istioJaegerVersion, istioElasticsearchMemory,
hostConfigDir, imageStreams string, installCommunity, installAuth, installLauncher bool,
launcherOpenShiftUser, launcherOpenShiftPassword, launcherGitHubUsername, launcherGitHubToken,
launcherCatalogGitRepo, launcherCatalogGitBranch, launcherBoosterCatalogFilter string,
istioKialiVersion, istioKialiUsername, istioKialiPassword string) error {
kubeClient, err := f.ClientSet()
if err != nil {
Expand Down Expand Up @@ -61,6 +64,7 @@ func (h *Helper) InstallIstio(f *clientcmd.Factory, serverVersion semver.Version
params.IstioInstallLauncher = installLauncher
params.IstioNamespace = istioNamespace
params.IstioJaegerImageVersion = istioJaegerVersion
params.IstioElasticsearchMemory = istioElasticsearchMemory
params.LauncherOpenShiftUser = launcherOpenShiftUser
params.LauncherOpenShiftPassword = launcherOpenShiftPassword
params.LauncherGitHubUsername = launcherGitHubUsername
Expand Down
9 changes: 6 additions & 3 deletions pkg/oc/bootstrap/docker/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,10 @@ type CommonStartConfig struct {

containerNetworkErr chan error

IstioImageVersion string
IstioImagePrefix string
IstioJaegerImageVersion string
IstioImageVersion string
IstioImagePrefix string
IstioJaegerImageVersion string
IstioElasticsearchMemory string

LauncherOpenShiftUser string
LauncherOpenShiftPassword string
Expand Down Expand Up @@ -314,6 +315,7 @@ func (config *CommonStartConfig) Bind(flags *pflag.FlagSet) {
flags.StringVar(&config.IstioImageVersion, "istio-version", variable.DefaultIstioImageVersion, "Specify the tag for Istio images (experimental)")
flags.StringVar(&config.IstioImagePrefix, "istio-image-prefix", variable.DefaultIstioImagePrefix, "Specify the image prefix to use for Istio (experimental)")
flags.StringVar(&config.IstioJaegerImageVersion, "istio-jaeger-version", "", "Specify the tag for Istio Jaeger images (experimental)")
flags.StringVar(&config.IstioElasticsearchMemory, "istio-elasticsearch-memory", "1Gi", "Specify the amount of memory required for the Elasticsearch deployments (experimental)")
flags.BoolVar(&config.ShouldInstallLauncher, "launcher", false, "Install Launcher for RHOAR Boosters (experimental)")
flags.StringVar(&config.LauncherOpenShiftUser, "launcher-openshift-user", "", "OpenShift user for Launcher (experimental)")
flags.StringVar(&config.LauncherOpenShiftPassword, "launcher-openshift-password", "", "OpenShift password for Launcher (experimental)")
Expand Down Expand Up @@ -1289,6 +1291,7 @@ func (c *ClientStartConfig) InstallIstio(out io.Writer) error {
c.IstioImageVersion,
c.IstioImagePrefix,
c.IstioJaegerImageVersion,
c.IstioElasticsearchMemory,
c.HostConfigDir,
c.ImageStreams,
c.ShouldInstallIstioCommunity,
Expand Down

0 comments on commit 4179b0a

Please sign in to comment.