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

Fix #2311: Add Support for creating bootstrap project template #2376

Merged
merged 1 commit into from Aug 10, 2020

Conversation

rohanKanojia
Copy link
Member

Fix #2311
Just like oc adm create-bootstrap-project-template generates a template yaml for
project request resources to be created; OpenShiftClient should be able to
generate + Apply resources based upon project request name, description, display name,
requesting user and admin user. It should create the following resources:

  • Project (actual project to be created)
  • RoleBinding system:deployers
  • RoleBinding system:image-builders
  • RoleBinding system:image-pullers
  • RoleBinding admin

Description

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change
  • Chore (non-breaking change which doesn't affect codebase;
    test, version modification, documentation, etc.)

Checklist

  • Code contributed by me aligns with current project license: Apache 2.0
  • I Added CHANGELOG entry regarding this change
  • I have implemented unit tests to cover my changes
  • I have added/updated the javadocs and other documentation accordingly
  • No new bugs, code smells, etc. in SonarCloud report
  • I tested my code in Kubernetes
  • I tested my code in OpenShift

@rohanKanojia rohanKanojia requested a review from manusa July 29, 2020 12:27
@rohanKanojia rohanKanojia force-pushed the pr/issue2311 branch 2 times, most recently from 1ab246f to 5a057ef Compare July 31, 2020 08:58
@rohanKanojia
Copy link
Member Author

retest this please

.build();
}

private List<HasMetadata> getNewProjectRoleBindings(String name, String adminUser) {
Copy link
Member

Choose a reason for hiding this comment

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

nit: same as https://github.com/fabric8io/kubernetes-client/pull/2376/files#r467693276, probably initRoleBinding is more clear

Just like `oc adm create-bootstrap-project-template` generates a template yaml for
project request resources to be created; OpenShiftClient should be able to
generate + Apply resources based upon project request name, description, display name,
requesting user and admin user. It should create the following resources:

- Project (actual project to be created)
- RoleBinding system:deployers
- RoleBinding system:image-builders
- RoleBinding system:image-pullers
- RoleBinding admin
@sonarcloud
Copy link

sonarcloud bot commented Aug 10, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@rohanKanojia
Copy link
Member Author

[merge]

@fusesource-ci fusesource-ci merged commit d147bec into fabric8io:master Aug 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenShiftClient: add support for ProjectRequest template parameters
4 participants