Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] 4.16 Testing #4060

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkg/containerinstall/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,16 @@ var (
)

func (m *manager) Install(ctx context.Context, sub *api.SubscriptionDocument, doc *api.OpenShiftClusterDocument, version *api.OpenShiftVersion) error {
pullPolicy := os.Getenv("ARO_PODMAN_PULL_POLICY")
if pullPolicy == "" {
pullPolicy = "always"
}

s := []steps.Step{
steps.Action(func(context.Context) error {
options := (&images.PullOptions{}).
WithQuiet(true).
WithPolicy("always").
WithPolicy(pullPolicy).
WithUsername(m.pullSecret.Username).
WithPassword(m.pullSecret.Password)

Expand Down
18 changes: 15 additions & 3 deletions pkg/util/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,15 @@ func (c *Cluster) Create(ctx context.Context, vnetResourceGroup, clusterName str
}
}

fipsMode := true

// Don't install with FIPS in a local dev, non-CI environment
if !c.ci && env.IsLocalDevelopmentMode() {
fipsMode = false
}

c.log.Info("creating cluster")
err = c.createCluster(ctx, vnetResourceGroup, clusterName, appDetails.applicationId, appDetails.applicationSecret, diskEncryptionSetID, visibility, osClusterVersion)
err = c.createCluster(ctx, vnetResourceGroup, clusterName, appDetails.applicationId, appDetails.applicationSecret, diskEncryptionSetID, visibility, osClusterVersion, fipsMode)

if err != nil {
return err
Expand Down Expand Up @@ -516,14 +523,19 @@ func (c *Cluster) Delete(ctx context.Context, vnetResourceGroup, clusterName str
// createCluster created new clusters, based on where it is running.
// development - using preview api
// production - using stable GA api
func (c *Cluster) createCluster(ctx context.Context, vnetResourceGroup, clusterName, clientID, clientSecret, diskEncryptionSetID string, visibility api.Visibility, osClusterVersion string) error {
func (c *Cluster) createCluster(ctx context.Context, vnetResourceGroup, clusterName, clientID, clientSecret, diskEncryptionSetID string, visibility api.Visibility, osClusterVersion string, fipsEnabled bool) error {
fipsMode := api.FipsValidatedModulesDisabled
if fipsEnabled {
fipsMode = api.FipsValidatedModulesEnabled
}

// using internal representation for "singe source" of options
oc := api.OpenShiftCluster{
Properties: api.OpenShiftClusterProperties{
ClusterProfile: api.ClusterProfile{
Domain: strings.ToLower(clusterName),
ResourceGroupID: fmt.Sprintf("/subscriptions/%s/resourceGroups/%s", c.env.SubscriptionID(), "aro-"+clusterName),
FipsValidatedModules: api.FipsValidatedModulesEnabled,
FipsValidatedModules: fipsMode,
Version: osClusterVersion,
PullSecret: api.SecureString(os.Getenv("USER_PULL_SECRET")),
},
Expand Down
4 changes: 2 additions & 2 deletions pkg/util/version/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ type Stream struct {
// This default is left here ONLY for use by local development mode,
// until we can come up with a better solution.
var DefaultInstallStream = Stream{
Version: NewVersion(4, 15, 35),
PullSpec: "quay.io/openshift-release-dev/ocp-release@sha256:8c8433f95d09b051e156ff638f4ccc95543918c3aed92b8c09552a8977a2a1a2",
Version: NewVersion(4, 16, 30),
PullSpec: "quay.io/openshift-release-dev/ocp-release@sha256:7aacace57ab6ec468dd98b0b3e0f3fc440b29afce21b90bd716fed0db487e9e9",
}

// FluentbitImage contains the location of the Fluentbit container image
Expand Down
Loading