migrate to operator version 1.33
This commit is contained in:
		
							parent
							
								
									8eac4695aa
								
							
						
					
					
						commit
						6ad8652a09
					
				|  | @ -16,14 +16,14 @@ RUN go mod download | ||||||
| 
 | 
 | ||||||
| # Copy the go source | # Copy the go source | ||||||
| COPY api/ api/ | COPY api/ api/ | ||||||
| COPY controllers/ controllers/ | COPY internal/controller/ internal/controller/ | ||||||
| COPY internal/ internal/ | COPY internal/ internal/ | ||||||
| COPY pkg/ pkg/ | COPY pkg/ pkg/ | ||||||
| COPY version/ version/ | COPY version/ version/ | ||||||
| COPY main.go main.go | COPY cmd/main.go cmd/main.go | ||||||
| 
 | 
 | ||||||
| # Build | # Build | ||||||
| RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH GO111MODULE=on go build -ldflags "-w $CTIMEVAR" -o manager main.go | RUN CGO_ENABLED=0 GOOS=${TARGETOS:-linux} GOARCH=${TARGETARCH} go build -a -o manager cmd/main.go | ||||||
| 
 | 
 | ||||||
| # Use distroless as minimal base image to package the manager binary | # Use distroless as minimal base image to package the manager binary | ||||||
| # Refer to https://github.com/GoogleContainerTools/distroless for more details | # Refer to https://github.com/GoogleContainerTools/distroless for more details | ||||||
|  |  | ||||||
							
								
								
									
										2
									
								
								PROJECT
								
								
								
								
							
							
						
						
									
										2
									
								
								PROJECT
								
								
								
								
							|  | @ -1,5 +1,5 @@ | ||||||
| domain: jenkins.io | domain: jenkins.io | ||||||
| layout: go.kubebuilder.io/v3 | layout: go.kubebuilder.io/v4 | ||||||
| projectName: jenkins-operator | projectName: jenkins-operator | ||||||
| repo: github.com/jenkinsci/kubernetes-operator | repo: github.com/jenkinsci/kubernetes-operator | ||||||
| resources: | resources: | ||||||
|  |  | ||||||
|  | @ -23,7 +23,7 @@ import ( | ||||||
| 	r "runtime" | 	r "runtime" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/api/v1alpha2" | 	"github.com/jenkinsci/kubernetes-operator/api/v1alpha2" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/controllers" | 	controllers "github.com/jenkinsci/kubernetes-operator/internal/controller" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/pkg/client" | 	"github.com/jenkinsci/kubernetes-operator/pkg/client" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/pkg/configuration/base/resources" | 	"github.com/jenkinsci/kubernetes-operator/pkg/configuration/base/resources" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/pkg/constants" | 	"github.com/jenkinsci/kubernetes-operator/pkg/constants" | ||||||
|  | @ -1,5 +1,5 @@ | ||||||
| NAME="kubernetes-operator" | NAME="kubernetes-operator" | ||||||
| OPERATOR_SDK_VERSION="1.28.0" | OPERATOR_SDK_VERSION="1.33.0" | ||||||
| GO_VERSION="1.20.3" | GO_VERSION="1.20.3" | ||||||
| PKG="github.com/jenkinsci/kubernetes-operator" | PKG="github.com/jenkinsci/kubernetes-operator" | ||||||
| QUAY_ORGANIZATION="jenkins-kubernetes-operator" | QUAY_ORGANIZATION="jenkins-kubernetes-operator" | ||||||
|  |  | ||||||
|  | @ -3145,7 +3145,6 @@ spec: | ||||||
|                     type: array |                     type: array | ||||||
|                 required: |                 required: | ||||||
|                 - disableCSRFProtection |                 - disableCSRFProtection | ||||||
|                 - latestPlugins |  | ||||||
|                 type: object |                 type: object | ||||||
|               notifications: |               notifications: | ||||||
|                 description: Notifications defines list of a services which are used |                 description: Notifications defines list of a services which are used | ||||||
|  |  | ||||||
|  | @ -25,7 +25,7 @@ spec: | ||||||
|         - /manager |         - /manager | ||||||
|         args: |         args: | ||||||
|         - --leader-elect |         - --leader-elect | ||||||
|         image: virtuslab/jenkins-operator:v0.7.1 |         image: quay.io/jenkins-kubernetes-operator/operator:v0.8.0 | ||||||
|         name: jenkins-operator |         name: jenkins-operator | ||||||
|         imagePullPolicy: IfNotPresent |         imagePullPolicy: IfNotPresent | ||||||
|         securityContext: |         securityContext: | ||||||
|  |  | ||||||
							
								
								
									
										34
									
								
								flake.lock
								
								
								
								
							
							
						
						
									
										34
									
								
								flake.lock
								
								
								
								
							|  | @ -18,38 +18,6 @@ | ||||||
|         "type": "github" |         "type": "github" | ||||||
|       } |       } | ||||||
|     }, |     }, | ||||||
|     "go_15": { |  | ||||||
|       "locked": { |  | ||||||
|         "lastModified": 1610974077, |  | ||||||
|         "narHash": "sha256-kfU2R7Q6eMU34VooazWvCqxOKwQOApCYh9TH79oZ8VA=", |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "rev": "4eccd6f731627ba5ad9915bcf600c9329a34ca78", |  | ||||||
|         "type": "github" |  | ||||||
|       }, |  | ||||||
|       "original": { |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "rev": "4eccd6f731627ba5ad9915bcf600c9329a34ca78", |  | ||||||
|         "type": "github" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "golangci": { |  | ||||||
|       "locked": { |  | ||||||
|         "lastModified": 1593485095, |  | ||||||
|         "narHash": "sha256-cgfJfZKqPgqQ1fdFWdpNnDEO2HmIVIDCvBTGke2LpnI=", |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "rev": "e912fb83d2155a393e7146da98cda0e455a80fb6", |  | ||||||
|         "type": "github" |  | ||||||
|       }, |  | ||||||
|       "original": { |  | ||||||
|         "owner": "nixos", |  | ||||||
|         "repo": "nixpkgs", |  | ||||||
|         "rev": "e912fb83d2155a393e7146da98cda0e455a80fb6", |  | ||||||
|         "type": "github" |  | ||||||
|       } |  | ||||||
|     }, |  | ||||||
|     "gomod2nix": { |     "gomod2nix": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-utils": [ |         "flake-utils": [ | ||||||
|  | @ -92,8 +60,6 @@ | ||||||
|     "root": { |     "root": { | ||||||
|       "inputs": { |       "inputs": { | ||||||
|         "flake-utils": "flake-utils", |         "flake-utils": "flake-utils", | ||||||
|         "go_15": "go_15", |  | ||||||
|         "golangci": "golangci", |  | ||||||
|         "gomod2nix": "gomod2nix", |         "gomod2nix": "gomod2nix", | ||||||
|         "nixpkgs": "nixpkgs" |         "nixpkgs": "nixpkgs" | ||||||
|       } |       } | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								flake.nix
								
								
								
								
							
							
						
						
									
										10
									
								
								flake.nix
								
								
								
								
							|  | @ -4,8 +4,6 @@ | ||||||
|   inputs = { |   inputs = { | ||||||
|     nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; |     nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||||||
|     flake-utils.url = "github:numtide/flake-utils"; |     flake-utils.url = "github:numtide/flake-utils"; | ||||||
|     go_15.url = "github:nixos/nixpkgs/4eccd6f731627ba5ad9915bcf600c9329a34ca78"; |  | ||||||
|     golangci.url = "github:nixos/nixpkgs/e912fb83d2155a393e7146da98cda0e455a80fb6"; |  | ||||||
|     gomod2nix = { |     gomod2nix = { | ||||||
|       url = "github:nix-community/gomod2nix"; |       url = "github:nix-community/gomod2nix"; | ||||||
|       inputs.nixpkgs.follows = "nixpkgs"; |       inputs.nixpkgs.follows = "nixpkgs"; | ||||||
|  | @ -13,12 +11,10 @@ | ||||||
|     }; |     }; | ||||||
|   }; |   }; | ||||||
| 
 | 
 | ||||||
|   outputs = { self, nixpkgs, flake-utils, go_15, golangci, gomod2nix, ... }: |   outputs = { self, nixpkgs, flake-utils, gomod2nix, ... }: | ||||||
|     flake-utils.lib.eachDefaultSystem (system: |     flake-utils.lib.eachDefaultSystem (system: | ||||||
|       let |       let | ||||||
|         pkgs = nixpkgs.legacyPackages.${system}; |         pkgs = nixpkgs.legacyPackages.${system}; | ||||||
|         go_15_pkgs = go_15.legacyPackages.${system}; |  | ||||||
|         golangci_pkgs = golangci.legacyPackages.${system}; |  | ||||||
|         operatorVersion = builtins.readFile ./VERSION.txt; |         operatorVersion = builtins.readFile ./VERSION.txt; | ||||||
|         sdkVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).OPERATOR_SDK_VERSION); |         sdkVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).OPERATOR_SDK_VERSION); | ||||||
|         jenkinsLtsVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).LATEST_LTS_VERSION); |         jenkinsLtsVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).LATEST_LTS_VERSION); | ||||||
|  | @ -33,8 +29,8 @@ | ||||||
|               pkgs.gnumake |               pkgs.gnumake | ||||||
|               pkgs.wget |               pkgs.wget | ||||||
|               pkgs.helm-docs |               pkgs.helm-docs | ||||||
|               go_15_pkgs.go |               pkgs.go_1_20 | ||||||
|               golangci_pkgs.golangci-lint |               pkgs.golangci-lint | ||||||
|           ]; |           ]; | ||||||
|           shellHook = '' |           shellHook = '' | ||||||
|               echo Operator Version ${operatorVersion} |               echo Operator Version ${operatorVersion} | ||||||
|  |  | ||||||
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							|  | @ -11,6 +11,8 @@ | ||||||
|   ) |   ) | ||||||
| , mkGoEnv ? pkgs.mkGoEnv | , mkGoEnv ? pkgs.mkGoEnv | ||||||
| , gomod2nix ? pkgs.gomod2nix | , gomod2nix ? pkgs.gomod2nix | ||||||
|  | , go20 ? pkgs.go_1_20 | ||||||
|  | , golangci-lint ? pkgs.golangci-lint | ||||||
| }: | }: | ||||||
| 
 | 
 | ||||||
| let | let | ||||||
|  | @ -18,6 +20,8 @@ let | ||||||
| in | in | ||||||
| pkgs.mkShell { | pkgs.mkShell { | ||||||
|   packages = [ |   packages = [ | ||||||
|  |     go20 | ||||||
|  |     golangci-lint | ||||||
|     goEnv |     goEnv | ||||||
|     gomod2nix |     gomod2nix | ||||||
|   ]; |   ]; | ||||||
|  |  | ||||||
|  | @ -6,7 +6,7 @@ import ( | ||||||
| 	"testing" | 	"testing" | ||||||
| 
 | 
 | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/api/v1alpha2" | 	"github.com/jenkinsci/kubernetes-operator/api/v1alpha2" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/controllers" | 	controllers "github.com/jenkinsci/kubernetes-operator/internal/controller" | ||||||
| 	jenkinsClient "github.com/jenkinsci/kubernetes-operator/pkg/client" | 	jenkinsClient "github.com/jenkinsci/kubernetes-operator/pkg/client" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/pkg/constants" | 	"github.com/jenkinsci/kubernetes-operator/pkg/constants" | ||||||
| 	"github.com/jenkinsci/kubernetes-operator/pkg/event" | 	"github.com/jenkinsci/kubernetes-operator/pkg/event" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue