-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2522723
commit f093342
Showing
27 changed files
with
345 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
100 changes: 100 additions & 0 deletions
100
src/main/java/org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
package org.csanchez.jenkins.plugins.kubernetes; | ||
|
||
import hudson.Extension; | ||
import hudson.model.AbstractDescribableImpl; | ||
import hudson.model.Descriptor; | ||
import org.jenkinsci.Symbol; | ||
import org.kohsuke.stapler.DataBoundConstructor; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Created by geanpalacios on 15/02/23. | ||
*/ | ||
public class ContainerReadinessProbe extends AbstractDescribableImpl<ContainerReadinessProbe> implements Serializable { | ||
private String execArgs; | ||
private int timeoutSeconds; | ||
private int initialDelaySeconds; | ||
private int failureThreshold; | ||
private int periodSeconds; | ||
private int successThreshold; | ||
|
||
@DataBoundConstructor | ||
public ContainerReadinessProbe(String execArgs, int timeoutSeconds, int initialDelaySeconds, int failureThreshold, int periodSeconds, int successThreshold) { | ||
this.execArgs = execArgs; | ||
this.timeoutSeconds = timeoutSeconds; | ||
this.initialDelaySeconds = initialDelaySeconds; | ||
this.failureThreshold = failureThreshold; | ||
this.periodSeconds = periodSeconds; | ||
this.successThreshold = successThreshold; | ||
} | ||
|
||
public String getExecArgs() { | ||
return execArgs; | ||
} | ||
|
||
public void setExecArgs(String execArgs) { | ||
this.execArgs = execArgs; | ||
} | ||
|
||
public int getTimeoutSeconds() { | ||
return timeoutSeconds; | ||
} | ||
|
||
public void setTimeoutSeconds(int timeoutSeconds) { | ||
this.timeoutSeconds = timeoutSeconds; | ||
} | ||
|
||
public int getInitialDelaySeconds() { | ||
return initialDelaySeconds; | ||
} | ||
|
||
public void setInitialDelaySeconds(int initialDelaySeconds) { | ||
this.initialDelaySeconds = initialDelaySeconds; | ||
} | ||
|
||
public int getFailureThreshold() { | ||
return failureThreshold; | ||
} | ||
|
||
public void setFailureThreshold(int failureThreshold) { | ||
this.failureThreshold = failureThreshold; | ||
} | ||
|
||
public int getPeriodSeconds() { | ||
return periodSeconds; | ||
} | ||
|
||
public void setPeriodSeconds(int periodSeconds) { | ||
this.periodSeconds = periodSeconds; | ||
} | ||
|
||
public int getSuccessThreshold() { | ||
return successThreshold; | ||
} | ||
|
||
public void setSuccessThreshold(int successThreshold) { | ||
this.successThreshold = successThreshold; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "ContainerReadinessProbe{" + | ||
"execArgs='" + execArgs + '\'' + | ||
", timeoutSeconds=" + timeoutSeconds + | ||
", initialDelaySeconds=" + initialDelaySeconds + | ||
", failureThreshold=" + failureThreshold + | ||
", periodSeconds=" + periodSeconds + | ||
", successThreshold=" + successThreshold + | ||
'}'; | ||
} | ||
|
||
@Extension | ||
@Symbol("containerReadinessProbe") | ||
public static class DescriptorImpl extends Descriptor<ContainerReadinessProbe> { | ||
@Override | ||
public String getDisplayName() { | ||
return "Container Readiness Probe"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
...in/resources/org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/config.jelly
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
<!-- | ||
Config page | ||
--> | ||
<?jelly escape-by-default='true'?> | ||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" | ||
xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | ||
<f:entry field="execArgs" title="${%Exec action}"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry field="initialDelaySeconds" title="${%Initial Delay Seconds}"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry field="timeoutSeconds" title="${%Timeout Seconds}"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry field="failureThreshold" title="${%Failure Threshold}"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry field="periodSeconds" title="${%Period Seconds}"> | ||
<f:textbox/> | ||
</f:entry> | ||
|
||
<f:entry field="successThreshold" title="${%Success Threshold}"> | ||
<f:textbox/> | ||
</f:entry> | ||
</j:jelly> |
28 changes: 28 additions & 0 deletions
28
...s/org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/config_zh_CN.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# The MIT License | ||
# | ||
# Copyright (c) 2018, Alauda | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
Exec\ action= | ||
Initial\ Delay\ Seconds= | ||
Timeout\ Seconds= | ||
Failure\ Threshold= | ||
Period\ Seconds= | ||
Success\ Threshold= |
1 change: 1 addition & 0 deletions
1
...ources/org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-execArgs.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Command executed by the readiness probe. |
5 changes: 5 additions & 0 deletions
5
...rg/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-failureThreshold.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<p> | ||
When a Pod starts and the probe fails, Kubernetes will try <em>failureThreshold</em> times before giving up.<br/> | ||
Giving up in case of liveness probe means restarting the container.<br/> | ||
In case of readiness probe the Pod will be marked Unready. Defaults to 3. Minimum value is 1. | ||
</p> |
1 change: 1 addition & 0 deletions
1
...csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-initialDelaySeconds.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Number of seconds after the container has started before liveness or readiness probes are initiated. Defaults to 0 seconds. Minimum value is 0. |
3 changes: 3 additions & 0 deletions
3
...s/org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-periodSeconds.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<p> | ||
How often (in seconds) to perform the probe. Default to 10 seconds. Minimum value is 1. | ||
</p> |
1 change: 1 addition & 0 deletions
1
...rg/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-successThreshold.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Minimum consecutive successes for the probe to be considered successful after having failed. Defaults to 1. Minimum value is 1. |
1 change: 1 addition & 0 deletions
1
.../org/csanchez/jenkins/plugins/kubernetes/ContainerReadinessProbe/help-timeoutSeconds.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Number of seconds after which the probe times out. Defaults to 1 second. Minimum value is 1. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.