Skip to content

Commit

Permalink
Merge pull request openshift#7508 from andfasano/invoker-ignition-con…
Browse files Browse the repository at this point in the history
…figs

AGENT-710: Use invoker for bootstrap template generation
  • Loading branch information
openshift-merge-robot authored Sep 22, 2023
2 parents b2f5f80 + 3bbeb3c commit a1e43e7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ if [ ! -f /opt/openshift/.pivot-done ]; then
record_service_stage_start "rebase-to-okd-os-image"
{{if .IsFCOS -}}
mnt="$(podman image mount "${MACHINE_OS_IMAGE}")"
{{- if .BootstrapInPlace }}
{{- if or (.BootstrapInPlace) (eq .Invoker "agent-installer") }}
# SNO setup boots into Live ISO which cannot be rebased
# https://github.com/coreos/rpm-ostree/issues/4547
mkdir /var/mnt/{upper,worker}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Description=Pivot bootstrap to the OpenShift Release Image
Wants=release-image.service
After=release-image.service
{{- if .BootstrapInPlace }}
{{- if or (.BootstrapInPlace) (eq .Invoker "agent-installer") }}
Before=bootkube.service kubelet.service
{{ else }}
Before=bootkube.service
Expand Down
5 changes: 5 additions & 0 deletions pkg/asset/ignition/bootstrap/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ type bootstrapTemplateData struct {
APIServerURL string
APIIntServerURL string
FeatureSet configv1.FeatureSet
Invoker string
}

// platformTemplateData is the data to use to replace values in bootstrap
Expand Down Expand Up @@ -309,6 +310,9 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo

apiURL := fmt.Sprintf("api.%s", installConfig.Config.ClusterDomain())
apiIntURL := fmt.Sprintf("api-int.%s", installConfig.Config.ClusterDomain())

openshiftInstallInvoker := os.Getenv("OPENSHIFT_INSTALL_INVOKER")

return &bootstrapTemplateData{
AdditionalTrustBundle: installConfig.Config.AdditionalTrustBundle,
FIPS: installConfig.Config.FIPS,
Expand All @@ -331,6 +335,7 @@ func (a *Common) getTemplateData(dependencies asset.Parents, bootstrapInPlace bo
APIServerURL: apiURL,
APIIntServerURL: apiIntURL,
FeatureSet: installConfig.Config.FeatureSet,
Invoker: openshiftInstallInvoker,
}
}

Expand Down

0 comments on commit a1e43e7

Please sign in to comment.