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 api/ api/
|
||||
COPY controllers/ controllers/
|
||||
COPY internal/controller/ internal/controller/
|
||||
COPY internal/ internal/
|
||||
COPY pkg/ pkg/
|
||||
COPY version/ version/
|
||||
COPY main.go main.go
|
||||
COPY cmd/main.go cmd/main.go
|
||||
|
||||
# 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
|
||||
# Refer to https://github.com/GoogleContainerTools/distroless for more details
|
||||
|
|
|
|||
2
PROJECT
2
PROJECT
|
|
@ -1,5 +1,5 @@
|
|||
domain: jenkins.io
|
||||
layout: go.kubebuilder.io/v3
|
||||
layout: go.kubebuilder.io/v4
|
||||
projectName: jenkins-operator
|
||||
repo: github.com/jenkinsci/kubernetes-operator
|
||||
resources:
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import (
|
|||
r "runtime"
|
||||
|
||||
"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/configuration/base/resources"
|
||||
"github.com/jenkinsci/kubernetes-operator/pkg/constants"
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
NAME="kubernetes-operator"
|
||||
OPERATOR_SDK_VERSION="1.28.0"
|
||||
OPERATOR_SDK_VERSION="1.33.0"
|
||||
GO_VERSION="1.20.3"
|
||||
PKG="github.com/jenkinsci/kubernetes-operator"
|
||||
QUAY_ORGANIZATION="jenkins-kubernetes-operator"
|
||||
|
|
|
|||
|
|
@ -3145,7 +3145,6 @@ spec:
|
|||
type: array
|
||||
required:
|
||||
- disableCSRFProtection
|
||||
- latestPlugins
|
||||
type: object
|
||||
notifications:
|
||||
description: Notifications defines list of a services which are used
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ spec:
|
|||
- /manager
|
||||
args:
|
||||
- --leader-elect
|
||||
image: virtuslab/jenkins-operator:v0.7.1
|
||||
image: quay.io/jenkins-kubernetes-operator/operator:v0.8.0
|
||||
name: jenkins-operator
|
||||
imagePullPolicy: IfNotPresent
|
||||
securityContext:
|
||||
|
|
|
|||
34
flake.lock
34
flake.lock
|
|
@ -18,38 +18,6 @@
|
|||
"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": {
|
||||
"inputs": {
|
||||
"flake-utils": [
|
||||
|
|
@ -92,8 +60,6 @@
|
|||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"go_15": "go_15",
|
||||
"golangci": "golangci",
|
||||
"gomod2nix": "gomod2nix",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
|
|
|
|||
10
flake.nix
10
flake.nix
|
|
@ -4,8 +4,6 @@
|
|||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
go_15.url = "github:nixos/nixpkgs/4eccd6f731627ba5ad9915bcf600c9329a34ca78";
|
||||
golangci.url = "github:nixos/nixpkgs/e912fb83d2155a393e7146da98cda0e455a80fb6";
|
||||
gomod2nix = {
|
||||
url = "github:nix-community/gomod2nix";
|
||||
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:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
go_15_pkgs = go_15.legacyPackages.${system};
|
||||
golangci_pkgs = golangci.legacyPackages.${system};
|
||||
operatorVersion = builtins.readFile ./VERSION.txt;
|
||||
sdkVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).OPERATOR_SDK_VERSION);
|
||||
jenkinsLtsVersion = ((builtins.fromTOML (builtins.readFile ./config.base.env)).LATEST_LTS_VERSION);
|
||||
|
|
@ -33,8 +29,8 @@
|
|||
pkgs.gnumake
|
||||
pkgs.wget
|
||||
pkgs.helm-docs
|
||||
go_15_pkgs.go
|
||||
golangci_pkgs.golangci-lint
|
||||
pkgs.go_1_20
|
||||
pkgs.golangci-lint
|
||||
];
|
||||
shellHook = ''
|
||||
echo Operator Version ${operatorVersion}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -11,6 +11,8 @@
|
|||
)
|
||||
, mkGoEnv ? pkgs.mkGoEnv
|
||||
, gomod2nix ? pkgs.gomod2nix
|
||||
, go20 ? pkgs.go_1_20
|
||||
, golangci-lint ? pkgs.golangci-lint
|
||||
}:
|
||||
|
||||
let
|
||||
|
|
@ -18,6 +20,8 @@ let
|
|||
in
|
||||
pkgs.mkShell {
|
||||
packages = [
|
||||
go20
|
||||
golangci-lint
|
||||
goEnv
|
||||
gomod2nix
|
||||
];
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import (
|
|||
"testing"
|
||||
|
||||
"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"
|
||||
"github.com/jenkinsci/kubernetes-operator/pkg/constants"
|
||||
"github.com/jenkinsci/kubernetes-operator/pkg/event"
|
||||
|
|
|
|||
Loading…
Reference in New Issue