Skip to content

Commit

Permalink
MGMT-14769: Enable upgrade agent by default
Browse files Browse the repository at this point in the history
The upgrade agent feature has been explicitly enabled in the SaaS
environments. This patch enables it by default in all the other
environments. It will still be possible to disable it setting the
`ENABLE_UPGRADE_AGENT` environment variable to `false`.

Related: https://issues.redhat.com/browse/MGMT-14769
Related: https://issues.redhat.com/browse/MGMT-10678
Signed-off-by: Juan Hernandez <jhernand@redhat.com>
  • Loading branch information
jhernand committed Jun 5, 2023
1 parent f55e7db commit f5cbadb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion deploy/podman/configmap-disconnected.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data:
RELEASE_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"<container image registry server:port>/ocp4/openshift4:4.10.22-x86_64","version":"4.10.22","default":true}]'
SERVICE_BASE_URL: http://<IP address of assisted installer host>:8090
STORAGE: filesystem
ENABLE_UPGRADE_AGENT: "false"
ENABLE_UPGRADE_AGENT: "true"
AGENT_DOCKER_IMAGE: "<container image registry server:port>/edge-infrastructure/assisted-installer-agent:latest"
CONTROLLER_IMAGE: "<container image registry server:port>/edge-infrastructure/assisted-installer-controller:latest"
INSTALLER_IMAGE: "<container image registry server:port>/edge-infrastructure/assisted-installer:latest"
Expand Down
2 changes: 1 addition & 1 deletion deploy/podman/configmap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ data:
RELEASE_IMAGES: '[{"openshift_version":"4.8","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.8.57-x86_64","version":"4.8.57"},{"openshift_version":"4.9","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.9.59-x86_64","version":"4.9.59"},{"openshift_version":"4.10","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.60-x86_64","version":"4.10.60"},{"openshift_version":"4.10","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.60-aarch64","version":"4.10.60"},{"openshift_version":"4.11","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.42-x86_64","version":"4.11.42"},{"openshift_version":"4.11","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.42-aarch64","version":"4.11.42"},{"openshift_version":"4.11.0-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.0-multi","version":"4.11.0-multi"},{"openshift_version":"4.12","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.19-x86_64","version":"4.12.19"},{"openshift_version":"4.12","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.19-aarch64","version":"4.12.19"},{"openshift_version":"4.12-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.12.19-multi","version":"4.12.19-multi"},{"openshift_version":"4.13","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.1-x86_64","version":"4.13.1","default":true},{"openshift_version":"4.13","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.1-aarch64","version":"4.13.1"},{"openshift_version":"4.13-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.13.1-multi","version":"4.13.1-multi"},{"openshift_version":"4.14","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.0-ec.1-x86_64","support_level":"beta","version":"4.14.0-ec.1"},{"openshift_version":"4.14","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.0-ec.1-aarch64","support_level":"beta","version":"4.14.0-ec.1"},{"openshift_version":"4.14-multi","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.14.0-ec.1-multi","support_level":"beta","version":"4.14.0-ec.1-multi"}]'
SERVICE_BASE_URL: http://127.0.0.1:8090
STORAGE: filesystem
ENABLE_UPGRADE_AGENT: "false"
ENABLE_UPGRADE_AGENT: "true"
2 changes: 1 addition & 1 deletion deploy/podman/configmap_tls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ data:
RELEASE_IMAGES: '[{"openshift_version":"4.10","cpu_architecture":"x86_64","cpu_architectures":["x86_64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.28-x86_64","version":"4.10.28"},{"openshift_version":"4.10","cpu_architecture":"arm64","cpu_architectures":["arm64"],"url":"quay.io/openshift-release-dev/ocp-release:4.10.28-aarch64","version":"4.10.28"},{"openshift_version":"4.11","cpu_architecture":"multi","cpu_architectures":["x86_64","arm64","ppc64le","s390x"],"url":"quay.io/openshift-release-dev/ocp-release:4.11.0-multi","version":"4.11.0","default":true}]'
SERVICE_BASE_URL: https://127.0.0.1:8090
STORAGE: filesystem
ENABLE_UPGRADE_AGENT: "false"
ENABLE_UPGRADE_AGENT: "true"
2 changes: 1 addition & 1 deletion internal/feature/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package feature
// Flags contains the values of the feature flags.
type Flags struct {
// EnableUpgradeAgent is a boolean flag to enable or disable the upgrade agent feature:
EnableUpgradeAgent bool `envconfig:"ENABLE_UPGRADE_AGENT" default:"false"`
EnableUpgradeAgent bool `envconfig:"ENABLE_UPGRADE_AGENT" default:"true"`

// EnableRejectUnknownFields is a boolean flag to enable or disable rejecting unknown fields
// in JSON request bodies.
Expand Down
2 changes: 1 addition & 1 deletion openshift/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ parameters:
value: "minimal-iso"
required: false
- name: ENABLE_UPGRADE_AGENT
value: "false"
value: "true"
required: false
- name: READINESS_PROBE_INITIAL_DELAY_SECONDS
value: "15"
Expand Down
12 changes: 7 additions & 5 deletions subsystem/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,9 @@ func getStepFromListByStepType(steps models.Steps, sType models.StepType) *model

func getNextSteps(infraEnvID, hostID strfmt.UUID) models.Steps {
steps, err := agentBMClient.Installer.V2GetNextSteps(context.Background(), &installer.V2GetNextStepsParams{
InfraEnvID: infraEnvID,
HostID: hostID,
InfraEnvID: infraEnvID,
HostID: hostID,
DiscoveryAgentVersion: swag.String("quay.io/edge-infrastructure/assisted-installer-agent:latest"),
})
Expect(err).NotTo(HaveOccurred())
return *steps.GetPayload()
Expand Down Expand Up @@ -288,9 +289,10 @@ func updateHostProgressWithInfo(hostID strfmt.UUID, infraEnvID strfmt.UUID, curr

func generateGetNextStepsWithTimestamp(ctx context.Context, h *models.Host, timestamp int64) {
_, err := agentBMClient.Installer.V2GetNextSteps(ctx, &installer.V2GetNextStepsParams{
HostID: *h.ID,
InfraEnvID: h.InfraEnvID,
Timestamp: &timestamp,
HostID: *h.ID,
InfraEnvID: h.InfraEnvID,
DiscoveryAgentVersion: swag.String("quay.io/edge-infrastructure/assisted-installer-agent:latest"),
Timestamp: &timestamp,
})
Expect(err).ToNot(HaveOccurred())
}
Expand Down

0 comments on commit f5cbadb

Please sign in to comment.