Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update version to 1.3.2, update sample + misc fixes #633

Merged
merged 3 commits into from
May 8, 2024
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
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ FROM registry.access.redhat.com/ubi8/ubi-minimal:latest
ARG USER_ID=65532
ARG GROUP_ID=65532

ARG VERSION_LABEL=1.3.1
ARG VERSION_LABEL=1.3.2
ARG RELEASE_LABEL=XX
ARG VCS_REF=0123456789012345678901234567890123456789
ARG VCS_URL="https://github.com/application-stacks/runtime-component-operator"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 1.3.1
VERSION ?= 1.3.2
OPERATOR_SDK_RELEASE_VERSION ?= v1.27.0

# CHANNELS define the bundle channels used in the bundle.
Expand Down
16 changes: 8 additions & 8 deletions bundle/manifests/runtime-component.clusterserviceversion.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ metadata:
"name": "runtimecomponent-sample"
},
"spec": {
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac",
"expose": true,
"manageTLS": true,
"replicas": 1,
Expand Down Expand Up @@ -44,7 +44,7 @@ metadata:
"name": "runtimecomponent-sample"
},
"spec": {
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f",
"applicationImage": "icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac",
"expose": true,
"replicas": 1,
"service": {
Expand All @@ -71,9 +71,9 @@ metadata:
categories: Application Runtime
certified: "true"
containerImage: icr.io/appcafe/runtime-component-operator:daily
createdAt: "2024-05-01T19:22:43Z"
createdAt: "2024-05-07T20:25:49Z"
description: Deploys any runtime component with dynamic and auto-tuning configuration
olm.skipRange: '>=0.8.0 <1.3.1'
olm.skipRange: '>=0.8.0 <1.3.2'
operators.openshift.io/infrastructure-features: '["disconnected"]'
operators.operatorframework.io/builder: operator-sdk-v1.27.0
operators.operatorframework.io/project_layout: go.kubebuilder.io/v3
Expand All @@ -84,7 +84,7 @@ metadata:
operatorframework.io/arch.ppc64le: supported
operatorframework.io/arch.s390x: supported
operatorframework.io/os.linux: supported
name: runtime-component.v1.3.1
name: runtime-component.v1.3.2
namespace: placeholder
spec:
apiservicedefinitions: {}
Expand Down Expand Up @@ -1006,7 +1006,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down Expand Up @@ -1289,8 +1289,8 @@ spec:
provider:
name: Community
relatedImages:
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
- image: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
name: liberty-sample-app
- image: icr.io/appcafe/runtime-component-operator:daily
name: runtime-component-operator
version: 1.3.1
version: 1.3.2
2 changes: 1 addition & 1 deletion catalog.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM registry.redhat.io/openshift4/ose-operator-registry:v4.14 AS builder
FROM registry.redhat.io/ubi8/ubi-minimal

# Add label for location of Declarative Config root directory & required OpenShift labels
ARG VERSION_LABEL=1.3.1
ARG VERSION_LABEL=1.3.2
ARG RELEASE_LABEL=XX
ARG VCS_REF=0123456789012345678901234567890123456789
ARG VCS_URL="https://github.com/application-stacks/runtime-component-operator"
Expand Down
2 changes: 1 addition & 1 deletion config/manager/manager.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ spec:
fieldRef:
fieldPath: metadata.annotations['olm.targetNamespaces']
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: OPERATOR_IMAGE
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
containerImage: icr.io/appcafe/runtime-component-operator:daily
createdAt: "2022-02-25T09:00:00Z"
description: Deploys any runtime component with dynamic and auto-tuning configuration
olm.skipRange: '>=0.8.0 <1.3.1'
olm.skipRange: '>=0.8.0 <1.3.2'
operators.openshift.io/infrastructure-features: '["disconnected"]'
repository: https://github.com/application-stacks/runtime-component-operator
support: Community
Expand Down
2 changes: 1 addition & 1 deletion config/samples/rc.app.stacks_v1_runtimecomponent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: RuntimeComponent
metadata:
name: runtimecomponent-sample
spec:
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
expose: true
manageTLS: true
replicas: 1
Expand Down
2 changes: 1 addition & 1 deletion config/samples/rc.app.stacks_v1beta2_runtimecomponent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: runtimecomponent-sample
spec:
# Add fields here
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
applicationImage: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
expose: true
replicas: 1
service:
Expand Down
35 changes: 19 additions & 16 deletions controllers/runtimecomponent_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,22 +205,25 @@ func (r *RuntimeComponentReconciler) Reconcile(ctx context.Context, req ctrl.Req
}
}

if appstacksutils.GetServiceAccountName(instance) == "" {
serviceAccount := &corev1.ServiceAccount{ObjectMeta: defaultMeta}
err = r.CreateOrUpdate(serviceAccount, instance, func() error {
return appstacksutils.CustomizeServiceAccount(serviceAccount, instance, r.GetClient())
})
if err != nil {
reqLogger.Error(err, "Failed to reconcile ServiceAccount")
return r.ManageError(err, common.StatusConditionTypeReconciled, instance)
}
} else {
// delete our SA, as one has been specified
serviceAccount := &corev1.ServiceAccount{ObjectMeta: defaultMeta}
err = r.DeleteResource(serviceAccount)
if err != nil {
reqLogger.Error(err, "Failed to delete ServiceAccount")
return r.ManageError(err, common.StatusConditionTypeReconciled, instance)
serviceAccountName := appstacksutils.GetServiceAccountName(instance)
if serviceAccountName != defaultMeta.Name {
if serviceAccountName == "" {
serviceAccount := &corev1.ServiceAccount{ObjectMeta: defaultMeta}
err = r.CreateOrUpdate(serviceAccount, instance, func() error {
return appstacksutils.CustomizeServiceAccount(serviceAccount, instance, r.GetClient())
})
if err != nil {
reqLogger.Error(err, "Failed to reconcile ServiceAccount")
return r.ManageError(err, common.StatusConditionTypeReconciled, instance)
}
} else {
// delete our SA, as one has been specified
serviceAccount := &corev1.ServiceAccount{ObjectMeta: defaultMeta}
err = r.DeleteResource(serviceAccount)
if err != nil {
reqLogger.Error(err, "Failed to delete ServiceAccount")
return r.ManageError(err, common.StatusConditionTypeReconciled, instance)
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion internal/deploy/kubectl/runtime-component-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ spec:
- name: WATCH_NAMESPACE
value: RUNTIME_COMPONENT_WATCH_NAMESPACE
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
fieldRef:
fieldPath: metadata.namespace
- name: RELATED_IMAGE_LIBERTY_SAMPLE_APP
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:cd4a9cc586dc371c34df44853abd3301bfd9bfde14efa01170625342a070d14f
value: icr.io/appcafe/open-liberty/samples/getting-started@sha256:b99e5af298a800a7d53217be7b33797cedb1eeadc4d5cd14c0c3aafccf21f1ac
- name: RELATED_IMAGE_RUNTIME_COMPONENT_OPERATOR
value: icr.io/appcafe/runtime-component-operator:daily
image: icr.io/appcafe/runtime-component-operator:daily
Expand Down
2 changes: 1 addition & 1 deletion utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/reconcile"
)

const RCOOperandVersion = "1.3.1"
const RCOOperandVersion = "1.3.2"

var APIVersionNotFoundError = errors.New("APIVersion is not available")

Expand Down