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

MGMT-1858 - subsystem should use dummy ignition image and not a real one #154

Merged

Conversation

yevgeny-shnaidman
Copy link
Contributor

No description provided.

@app-sre-bot
Copy link

Can one of the admins verify this patch?

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 18, 2020
@yevgeny-shnaidman
Copy link
Contributor Author

/assign @ronniel1
/assign @filanov

Makefile Outdated
@@ -78,14 +79,17 @@ generate-keys:
##################

.PHONY: build
build: lint unit-test build-minimal build-iso-generator generate-keys
build: lint unit-test build-minimal build-iso-generator build-dummy-ignition generate-keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should not be part of build

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing

Makefile Outdated
@@ -104,10 +108,13 @@ update-minimal: build-minimal
GIT_REVISION=${GIT_REVISION} docker build --network=host --build-arg GIT_REVISION \
-f Dockerfile.assisted-service . -t $(SERVICE)

update-minikube: build
update-minikube: build build-dummy-ignition-image
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it should be in jenkins-deploy-for-subsystem as well

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing

@@ -302,6 +303,10 @@ func (k *kubeJob) GenerateISO(ctx context.Context, cluster common.Cluster, jobNa
func (k *kubeJob) createKubeconfigJob(cluster *common.Cluster, jobName string, cfg []byte, encodedDhcpFileContents string) *batch.Job {
id := cluster.ID
ignitionGeneratorImage := k.Config.IgnitionGenerator
var pullPolicy core.PullPolicy = "Always"
if k.Config.SubsystemRun {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not making the policy as a flag?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have the always flag?
Since (see my comment on the default name of the image) will never be in external repo, always should work, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ronniel1 always flag means that kuberenetes will try to pull the image from external repo every time, that's why we need to set never on subsystem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but in this case there will not be an external repo

Copy link
Contributor

@ronniel1 ronniel1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must also change the Jenkinsfile for this to work in jenkins

Makefile Outdated
@@ -78,14 +79,17 @@ generate-keys:
##################

.PHONY: build
build: lint unit-test build-minimal build-iso-generator generate-keys
build: lint unit-test build-minimal build-iso-generator build-dummy-ignition generate-keys
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Makefile Outdated
@@ -20,6 +20,7 @@ endif # TARGET

SERVICE := $(or ${SERVICE},quay.io/ocpmetal/assisted-service:latest)
ISO_CREATION := $(or ${ISO_CREATION},quay.io/ocpmetal/assisted-iso-create:latest)
DUMMY_IGNITION := $(or ${DUMMY_IGNITION},quay.io/ocpmetal/ignition-dummy:latest)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should never push the dummy ignition to ocpmetal, so the default should be something local. for example minikube-local-registry/ignition-dummy-generator

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixing

@@ -302,6 +303,10 @@ func (k *kubeJob) GenerateISO(ctx context.Context, cluster common.Cluster, jobNa
func (k *kubeJob) createKubeconfigJob(cluster *common.Cluster, jobName string, cfg []byte, encodedDhcpFileContents string) *batch.Job {
id := cluster.ID
ignitionGeneratorImage := k.Config.IgnitionGenerator
var pullPolicy core.PullPolicy = "Always"
if k.Config.SubsystemRun {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not have the always flag?
Since (see my comment on the default name of the image) will never be in external repo, always should work, no?

@filanov
Copy link
Contributor

filanov commented Aug 18, 2020

@yevgeny-shnaidman @ronniel1 why not make it part of the ignition repo?
It's strange the assisted-service need to build a mock for a different service no?
maybe we can have this code and the build process in the ignition repo?

@yevgeny-shnaidman
Copy link
Contributor Author

@filanov since assisted-service is using this image, then i think it is more logical that it implements the mock. In addition, if we move the mock to ignition repo, then you need to actually deliver it to remote repo

@yevgeny-shnaidman
Copy link
Contributor Author

@ronniel1 "always" flag means that kuberenetes will try to access remote repository, without regards to whether image present locally or not

@@ -302,6 +303,10 @@ func (k *kubeJob) GenerateISO(ctx context.Context, cluster common.Cluster, jobNa
func (k *kubeJob) createKubeconfigJob(cluster *common.Cluster, jobName string, cfg []byte, encodedDhcpFileContents string) *batch.Job {
id := cluster.ID
ignitionGeneratorImage := k.Config.IgnitionGenerator
var pullPolicy core.PullPolicy = "Always"
if k.Config.SubsystemRun {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but in this case there will not be an external repo

jenkins-deploy-for-subsystem:
export TEST_FLAGS=--subsystem-test && export ENABLE_AUTH="True" && $(MAKE) deploy-all
jenkins-deploy-for-subsystem: build-dummy-ignition-image
export TEST_FLAGS=--subsystem-test && export ENABLE_AUTH="True" && export DUMMY_IGNITION=${DUMMY_IGNITION} && $(MAKE) deploy-all
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export DUMMY_IGNITION=minikube-local-registry/ignition-dummy-generator:minikube-test

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ronniel1 kubernetes will still treat it as external and will try to connect

@ronniel1
Copy link
Contributor

/approve cancel

@ronniel1
Copy link
Contributor

/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 18, 2020
@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: ronniel1, yevgeny-shnaidman

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [ronniel1,yevgeny-shnaidman]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ronniel1
Copy link
Contributor

/lgtm

@openshift-merge-robot openshift-merge-robot merged commit 2ed1b5a into openshift:master Aug 18, 2020
carbonin added a commit to carbonin/assisted-ignition-generator that referenced this pull request Aug 18, 2020
openshift-merge-robot pushed a commit to openshift/assisted-ignition-generator that referenced this pull request Aug 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants