Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Fix #1770: Provide support for setting BuildConfig memory/CPU requests and limits #1772

Merged
merged 1 commit into from
Jan 9, 2020

Conversation

rohanKanojia
Copy link
Member

@rohanKanojia rohanKanojia commented Jan 3, 2020

Fix #1770

This PR provides the support of configuring BuildConfig's spec using xml config or as a resource fragment. You can have xml config like this:

            <plugin>
                <groupId>io.fabric8</groupId>
                <artifactId>fabric8-maven-plugin</artifactId>
                <version>4.4-SNAPSHOT</version>
                <configuration>
                  <resources>
                    <openshiftBuildConfig>
                      <limits>
                        <cpu>100m</cpu>
                        <memory>256Mi</memory>
                      </limits>
                    </openshiftBuildConfig>
                  </resources>
                </configuration>
            </plugin>

this.requests = requests;
}

private Map<String, String> requests;
Copy link
Contributor

Choose a reason for hiding this comment

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

not a serious change request but can you group the class properties together and the functions together?


if (specBuilder.buildSource() == null) {
specBuilder.withNewSource()
.withType("Binary")
Copy link
Contributor

Choose a reason for hiding this comment

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

can you eliminate the hard coding here and all the places where SourceType property is used?

Copy link
Member

@manusa manusa left a comment

Choose a reason for hiding this comment

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

LGTM

@rohanKanojia rohanKanojia merged commit d35cc3b into fabric8io:master Jan 9, 2020
@rohanKanojia rohanKanojia added jkube/pending The issue/PR has to be taken care of in JKube https://github.com/eclipse/jkube target/JKube Implementation to be performed in JKube and removed jkube/pending The issue/PR has to be taken care of in JKube https://github.com/eclipse/jkube labels Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
target/JKube Implementation to be performed in JKube
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No way to set build config memory/CPU request and limi
4 participants