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

Bug 1843222: fixes issue with internal image imports for self-provisioner with edi… #6514

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -42,14 +42,14 @@ export const createSystemImagePullerRoleBinding = (
kind: RoleBindingModel.kind,
apiVersion: `${RoleBindingModel.apiGroup}/${RoleBindingModel.apiVersion}`,
metadata: {
name: 'system:image-puller',
namespace: imageStream.namespace,
name: `system:image-puller-${imageStream.namespace}`,
namespace: formData.project.name,
},
subjects: [
{
kind: 'ServiceAccount',
name: 'default',
namespace: formData.project.name,
namespace: imageStream.namespace,
},
],
roleRef: {
Expand Down
Expand Up @@ -30,15 +30,15 @@ const ImageStreamNsDropdown: React.FC = () => {
resource: RoleBindingModel.plural,
verb: 'create',
name: 'system:image-puller',
namespace: selectedProject,
namespace: values.project.name,
})
.then((resp) =>
dispatch({ type: Action.setHasCreateAccess, value: resp.status.allowed }),
)
.catch(() => dispatch({ type: Action.setHasAccessToPullImage, value: false })),
);
promiseArr.push(
k8sGet(RoleBindingModel, 'system:image-puller', selectedProject)
k8sGet(RoleBindingModel, `system:image-puller-${selectedProject}`, values.project.name)
.then(() => {
dispatch({
type: Action.setHasAccessToPullImage,
Expand All @@ -59,6 +59,7 @@ const ImageStreamNsDropdown: React.FC = () => {
initialValues.imageStream.tag,
initialValues.isi,
setFieldValue,
values.project.name,
],
);

Expand Down