Skip to content
This repository has been archived by the owner on Oct 20, 2022. It is now read-only.

Commit

Permalink
[Feature/Operator] Upgrade cert-manager & operator sdk dependencies (#85
Browse files Browse the repository at this point in the history
)

* upgrade operator sdk to 1.5.0 & cert-manager to 1.2.0

* update documentation

* update documentation

* append changelog

* update golang version for ci

* fix build image
  • Loading branch information
erdrix authored Mar 22, 2021
1 parent 4e0888c commit 6dc6955
Show file tree
Hide file tree
Showing 22 changed files with 326 additions and 62 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ orbs:
executors:
operator-build:
docker:
- image: orangeopensource/nifikop-build:v0.18.0
- image: orangeopensource/nifikop-build:1.15
# Define jobs list
jobs:
# Build job, which build operator docker image (with operator-sdk build)
Expand Down
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,19 @@

### Changed

- [PR #85](https://github.com/Orange-OpenSource/nifikop/pull/85) - **[Operator/Dependencies]** Upgrade cert-manager & operator sdk dependencies

### Deprecated

- [PR #85](https://github.com/Orange-OpenSource/nifikop/pull/85) - **[Operator/Finalizers]** The finalizer name format suggested by [Kubernetes docs](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/#finalizers) is <qualified-group>/<finalizer-name>, while the format previously documented by Operator SDK docs was <finalizer-name>.<qualified-group>. If your operator uses any finalizers with names matching the incorrect format, change them to match the official format. For example, finalizer.nifiusergroups.nifi.orange.com should be changed to nifiusergroups.nifi.orange.com/finalizer.

### Removed

### Fixed Bugs

## v0.5.3

### Fixed Bugs**
### Fixed Bugs

- [PR #82](https://github.com/Orange-OpenSource/nifikop/pull/82) - **[Operator/NifiParameterContext]** Enable empty value
- [PR #83](https://github.com/Orange-OpenSource/nifikop/pull/83) - **[Operator/NiFiUser]** Rework the certificate secret creation, to prevent issues with JKS password creation.
Expand Down
28 changes: 27 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,17 @@ SERVICE_NAME := nifikop
DOCKER_REGISTRY_BASE ?= orangeopensource
IMAGE_TAG ?= $(shell git describe --tags --abbrev=0 --match '[0-9].*[0-9].*[0-9]' 2>/dev/null)
IMAGE_NAME ?= $(SERVICE_NAME)
BUILD_IMAGE ?= orangeopensource/nifikop-build
GOLANG_VERSION ?= 1.15

# workdir
WORKDIR := /go/nifikop

# Debug variables
TELEPRESENCE_REGISTRY ?= datawire

DEV_DIR := docker/build-image

# Repository url for this project
# in gitlab CI_REGISTRY_IMAGE=repo/path/name:tag
ifdef CI_REGISTRY_IMAGE
Expand Down Expand Up @@ -235,4 +239,26 @@ debug-telepresence:
$(call debug_telepresence)

debug-telepresence-with-alias:
$(call debug_telepresence,--also-proxy,10.40.0.0/16)
$(call debug_telepresence,--also-proxy,10.40.0.0/16)

# Build the docker development environment
build-ci-image:
docker build --cache-from $(BUILD_IMAGE):latest \
--build-arg GOLANG_VERSION=$(GOLANG_VERSION) \
-t $(BUILD_IMAGE):latest \
-t $(BUILD_IMAGE):$(GOLANG_VERSION) \
-f $(DEV_DIR)/Dockerfile \
.

push-ci-image:
docker push $(BUILD_IMAGE):$(GOLANG_VERSION)
ifdef PUSHLATEST
docker push $(BUILD_IMAGE):latest
endif

## Test if the dependencies we need to run this Makefile are installed
#deps-development:
#ifndef DOCKER
# @echo "Docker is not available. Please install docker"
# @exit 1
#endif
62 changes: 55 additions & 7 deletions PROJECT
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,79 @@ layout: go.kubebuilder.io/v3
projectName: nifikop
repo: github.com/Orange-OpenSource/nifikop
resources:
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiCluster
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiUserGroup
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiUser
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiRegistryClient
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiDataflow
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
- crdVersion: v1
- api:
crdVersion: v1
# TODO(user): Uncomment the below line if this resource's CRD is namespace scoped, else delete it.
# namespaced: true
# TODO(user): Uncomment the below line if this resource implements a controller, else delete it.
# controller: true
domain: orange.com
group: nifi
kind: NifiParameterContext
# TODO(user): Update the package path for your API if the below value is incorrect.
path: github.com/Orange-OpenSource/nifikop/api/v1alpha1
version: v1alpha1
version: 3-alpha
version: "3"
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
3 changes: 3 additions & 0 deletions config/crd/bases/nifi.orange.com_nificlusters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1331,10 +1331,13 @@ spec:
act as CA : https://cert-manager.io/docs/concepts/issuer/'
properties:
group:
description: Group of the resource being referred to.
type: string
kind:
description: Kind of the resource being referred to.
type: string
name:
description: Name of the resource being referred to.
type: string
required:
- name
Expand Down
1 change: 1 addition & 0 deletions config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,4 @@ spec:
cpu: 100m
memory: 20Mi
terminationGracePeriodSeconds: 10
serviceAccountName: controller-manager
1 change: 1 addition & 0 deletions config/rbac/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ resources:
- auth_proxy_role.yaml
- auth_proxy_role_binding.yaml
- auth_proxy_client_clusterrole.yaml
- service_account.yaml
2 changes: 1 addition & 1 deletion config/rbac/role_binding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ roleRef:
name: manager-role
subjects:
- kind: ServiceAccount
name: default
name: controller-manager
namespace: system
5 changes: 5 additions & 0 deletions config/rbac/service_account.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
apiVersion: v1
kind: ServiceAccount
metadata:
name: controller-manager
namespace: system
2 changes: 1 addition & 1 deletion config/scorecard/patches/basic.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
entrypoint:
- scorecard-test
- basic-check-spec
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: basic
test: basic-check-spec-test
10 changes: 5 additions & 5 deletions config/scorecard/patches/olm.config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
entrypoint:
- scorecard-test
- olm-bundle-validation
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: olm
test: olm-bundle-validation-test
Expand All @@ -14,7 +14,7 @@
entrypoint:
- scorecard-test
- olm-crds-have-validation
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: olm
test: olm-crds-have-validation-test
Expand All @@ -24,7 +24,7 @@
entrypoint:
- scorecard-test
- olm-crds-have-resources
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: olm
test: olm-crds-have-resources-test
Expand All @@ -34,7 +34,7 @@
entrypoint:
- scorecard-test
- olm-spec-descriptors
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: olm
test: olm-spec-descriptors-test
Expand All @@ -44,7 +44,7 @@
entrypoint:
- scorecard-test
- olm-status-descriptors
image: quay.io/operator-framework/scorecard-test:v1.3.0
image: quay.io/operator-framework/scorecard-test:v1.5.0
labels:
suite: olm
test: olm-status-descriptors-test
4 changes: 2 additions & 2 deletions controllers/nificluster_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var clusterFinalizer = "finalizer.nificlusters.nifi.orange.com"
var clusterUsersFinalizer = "users.nificlusters.nifi.orange.com"
var clusterFinalizer = "nificlusters.nifi.orange.com/finalizer"
var clusterUsersFinalizer = "nificlusters.nifi.orange.com/users"

// NifiClusterReconciler reconciles a NifiCluster object
type NifiClusterReconciler struct {
Expand Down
2 changes: 1 addition & 1 deletion controllers/nifidataflow_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var dataflowFinalizer = "finalizer.nifidataflows.nifi.orange.com"
var dataflowFinalizer = "nifidataflows.nifi.orange.com/finalizer"

// NifiDataflowReconciler reconciles a NifiDataflow object
type NifiDataflowReconciler struct {
Expand Down
2 changes: 1 addition & 1 deletion controllers/nifiparametercontext_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var parameterContextFinalizer = "finalizer.nifiparametercontexts.nifi.orange.com"
var parameterContextFinalizer = "nifiparametercontexts.nifi.orange.com/finalizer"

// NifiParameterContextReconciler reconciles a NifiParameterContext object
type NifiParameterContextReconciler struct {
Expand Down
2 changes: 1 addition & 1 deletion controllers/nifiregistryclient_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var registryClientFinalizer = "finalizer.nifiregistryclients.nifi.orange.com"
var registryClientFinalizer = "nifiregistryclients.nifi.orange.com/finalizer"

// NifiRegistryClientReconciler reconciles a NifiRegistryClient object
type NifiRegistryClientReconciler struct {
Expand Down
2 changes: 1 addition & 1 deletion controllers/nifiuser_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var userFinalizer = "finalizer.nifiusers.nifi.orange.com"
var userFinalizer = "nifiusers.nifi.orange.com/finalizer"

// NifiUserReconciler reconciles a NifiUser object
type NifiUserReconciler struct {
Expand Down
2 changes: 1 addition & 1 deletion controllers/nifiusergroup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import (
"github.com/Orange-OpenSource/nifikop/api/v1alpha1"
)

var userGroupFinalizer = "finalizer.nifiusergroups.nifi.orange.com"
var userGroupFinalizer = "nifiusergroups.nifi.orange.com/finalizer"

// NifiUserGroupReconciler reconciles a NifiUserGroup object
type NifiUserGroupReconciler struct {
Expand Down
Loading

0 comments on commit 6dc6955

Please sign in to comment.