Intermediate Commit for transition from Pod to Deployment based Jenkins Controller

Allows for using the annotation jenkins.io/use-deployment
and setting the value to true makes the operator use a
Deployment instead of Pod for serving Jenkins.

This is part of a temporary feature and has to be committed to avoid bigger PRs.
This commit is contained in:
Vibhav Bobade
2020-05-15 12:44:54 +05:30
parent 2dea7124dd
commit b77592e9d1
9 changed files with 168 additions and 25 deletions
+2 -2
View File
@@ -156,7 +156,7 @@ func createJenkinsCR(t *testing.T, name, namespace string, seedJob *[]v1alpha2.S
func createJenkinsAPIClientFromServiceAccount(t *testing.T, jenkins *v1alpha2.Jenkins, jenkinsAPIURL string) (jenkinsclient.Jenkins, error) {
t.Log("Creating Jenkins API client from service account")
podName := resources.GetJenkinsMasterPodName(*jenkins)
podName := resources.GetJenkinsMasterPodName(jenkins)
clientSet, err := kubernetes.NewForConfig(framework.Global.KubeConfig)
if err != nil {
@@ -197,7 +197,7 @@ func verifyJenkinsAPIConnection(t *testing.T, jenkins *v1alpha2.Jenkins, namespa
}, &service)
require.NoError(t, err)
podName := resources.GetJenkinsMasterPodName(*jenkins)
podName := resources.GetJenkinsMasterPodName(jenkins)
port, cleanUpFunc, waitFunc, portForwardFunc, err := setupPortForwardToPod(t, namespace, podName, int(constants.DefaultHTTPPortInt32))
if err != nil {
t.Fatal(err)