Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ test-verify-cmd:


.EXPORT_ALL_VARIABLES:
TMP_CR_FILE=$(TMP_DIR)apis_v1alpha1_integrityshield.yaml
TMP_CR_FILE=$(TMP_DIR)apis_v1_integrityshield.yaml
# export KUBE_CONTEXT_USERNAME=kind-test-managed

test-e2e: export KUBECONFIG=$(SHIELD_OP_DIR)kubeconfig_managed
Expand Down Expand Up @@ -365,23 +365,23 @@ delete-operator:
kustomize build $(SHIELD_OP_DIR)config/default | kubectl delete -f -

create-cr:
kubectl apply -f ${SHIELD_OP_DIR}config/samples/apis_v1alpha1_integrityshield.yaml -n $(ISHIELD_OP_NS)
kubectl apply -f ${SHIELD_OP_DIR}config/samples/apis_v1_integrityshield.yaml -n $(ISHIELD_OP_NS)

delete-cr:
kubectl delete -f ${SHIELD_OP_DIR}config/samples/apis_v1alpha1_integrityshield.yaml -n $(ISHIELD_OP_NS)
kubectl delete -f ${SHIELD_OP_DIR}config/samples/apis_v1_integrityshield.yaml -n $(ISHIELD_OP_NS)

deploy-cr-ac:
kubectl apply -f $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield_ac.yaml -n $(ISHIELD_OP_NS)
kubectl apply -f $(SHIELD_OP_DIR)config/samples/apis_v1_integrityshield_ac.yaml -n $(ISHIELD_OP_NS)

delete-cr-ac:
kubectl delete -f $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield_ac.yaml -n $(ISHIELD_OP_NS)
kubectl delete -f $(SHIELD_OP_DIR)config/samples/apis_v1_integrityshield_ac.yaml -n $(ISHIELD_OP_NS)

# create a temporary cr with update image names as well as signers
setup-tmp-cr:
@echo
@echo prepare cr
@echo copy cr into tmp dir
cp $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield_local.yaml $(TMP_CR_FILE)
cp $(SHIELD_OP_DIR)config/samples/apis_v1_integrityshield_local.yaml $(TMP_CR_FILE)
@echo insert image
yq write -i $(TMP_CR_FILE) spec.shieldApi.image $(TEST_ISHIELD_SERVER_IMAGE_NAME_AND_VERSION)
yq write -i $(TMP_CR_FILE) spec.shieldApi.imagePullPolicy Always
Expand Down Expand Up @@ -467,7 +467,7 @@ setup-demo:
cp $(TMP_DIR)kustomization.yaml $(SHIELD_OP_DIR)config/manager/kustomization.yaml
@echo prepare cr
@echo copy cr into tmp dir
cp $(SHIELD_OP_DIR)config/samples/apis_v1alpha1_integrityshield.yaml $(TMP_CR_FILE)
cp $(SHIELD_OP_DIR)config/samples/apis_v1_integrityshield.yaml $(TMP_CR_FILE)
@echo insert image
yq write -i $(TMP_CR_FILE) spec.observer.image $(DEMO_ISHIELD_ADMISSION_CONTROLLER_IMAGE_NAME)
yq write -i $(TMP_CR_FILE) spec.observer.imagePullPolicy Always
Expand Down
2 changes: 1 addition & 1 deletion integrity-shield-operator/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi

CONTROLLER_GEN = $(shell pwd)/bin/controller-gen
controller-gen: ## Download controller-gen locally if necessary.
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1)
$(call go-get-tool,$(CONTROLLER_GEN),sigs.k8s.io/controller-tools/cmd/controller-gen@v0.5.0)

KUSTOMIZE = $(shell pwd)/bin/kustomize
kustomize: ## Download kustomize locally if necessary.
Expand Down
8 changes: 5 additions & 3 deletions integrity-shield-operator/PROJECT
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
domain: integrityshield.io
layout: go.kubebuilder.io/v3
layout:
- go.kubebuilder.io/v3
plugins:
manifests.sdk.operatorframework.io/v2: {}
scorecard.sdk.operatorframework.io/v2: {}
Expand All @@ -13,6 +14,7 @@ resources:
domain: integrityshield.io
group: apis
kind: IntegrityShield
path: github.com/IBM/integrity-shield/integrity-shield-operator/api/v1alpha1
version: v1alpha1
path: github.com/IBM/integrity-shield/integrity-shield-operator/api/v1
version: v1
plural: IntegrityShields
version: "3"
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
// See the License for the specific language governing permissions and
// limitations under the License.

// Package v1alpha1 contains API Schema definitions for the apis v1alpha1 API group
// Package v1 contains API Schema definitions for the apis v1 API group
//+kubebuilder:object:generate=true
//+groupName=apis.integrityshield.io
package v1alpha1
package v1

import (
"k8s.io/apimachinery/pkg/runtime/schema"
Expand All @@ -24,7 +24,7 @@ import (

var (
// GroupVersion is group version used to register these objects
GroupVersion = schema.GroupVersion{Group: "apis.integrityshield.io", Version: "v1alpha1"}
GroupVersion = schema.GroupVersion{Group: "apis.integrityshield.io", Version: "v1"}

// SchemeBuilder is used to add go types to the GroupVersionKind scheme
SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

package v1alpha1
package v1

import (
admv1 "k8s.io/api/admissionregistration/v1"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 1 addition & 18 deletions integrity-shield-operator/bundle.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,3 @@
#
# Copyright 2021 IBM Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#


FROM scratch

# Core bundle labels.
Expand All @@ -23,7 +6,7 @@ LABEL operators.operatorframework.io.bundle.manifests.v1=manifests/
LABEL operators.operatorframework.io.bundle.metadata.v1=metadata/
LABEL operators.operatorframework.io.bundle.package.v1=integrity-shield-operator
LABEL operators.operatorframework.io.bundle.channels.v1=alpha
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.10.1
LABEL operators.operatorframework.io.metrics.builder=operator-sdk-v1.11.0
LABEL operators.operatorframework.io.metrics.mediatype.v1=metrics+v1
LABEL operators.operatorframework.io.metrics.project_layout=go.kubebuilder.io/v3

Expand Down
Loading