-
Notifications
You must be signed in to change notification settings - Fork 217
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
MGMT-1858 - subsystem should use dummy ignition image and not a real one #154
Conversation
Can one of the admins verify this patch? |
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this 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 |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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?
@yevgeny-shnaidman @ronniel1 why not make it part of the ignition repo? |
@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 |
@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 { |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
/approve cancel |
13a6975
to
d34ca91
Compare
/approve |
[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:
Approvers can indicate their approval by writing |
/lgtm |
openshift/assisted-service#154 changed them from lower case to caps
openshift/assisted-service#154 changed them from lower case to caps
No description provided.