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

Remove the usage of deprecated features #627

Merged
merged 1 commit into from
Aug 26, 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
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ metadata:
categories: Application Runtime
certified: "true"
containerImage: icr.io/appcafe/runtime-component-operator:daily
createdAt: "2024-08-23T13:51:42Z"
createdAt: "2024-08-26T15:51:08Z"
description: Deploys any runtime component with dynamic and auto-tuning configuration
features.operators.openshift.io/disconnected: "true"
features.operators.openshift.io/fips-compliant: "true"
Expand Down
1 change: 0 additions & 1 deletion config/certmanager/certificate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ spec:
# $(SERVICE_NAME) and $(SERVICE_NAMESPACE) will be substituted by kustomize
dnsNames:
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc
- $(SERVICE_NAME).$(SERVICE_NAMESPACE).svc.cluster.local
issuerRef:
kind: Issuer
name: selfsigned-issuer
Expand Down
16 changes: 8 additions & 8 deletions scripts/dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ main() {
setup_knative_serving
install_cert_manager
add_affinity_label_to_node
create_image_content_source_policy
create_image_digest_mirror_set
elif [[ "$COMMAND" == "scorecard" ]]; then
run_scorecard
elif [[ "$COMMAND" == "deploy" ]]; then
Expand Down Expand Up @@ -442,16 +442,16 @@ add_affinity_label_to_node() {
fi
}

create_image_content_source_policy() {
if ! oc get imagecontentsourcepolicy | grep mirror-config >/dev/null; then
echo "Adding ImageContentSourcePolicy to mirror to staging repository..."
create_image_digest_mirror_set() {
if ! oc get ImageDigestMirrorSet | grep mirror-config >/dev/null; then
echo "Adding ImageDigestMirrorSet to mirror to staging repository..."
cat <<EOF | oc apply -f -
apiVersion: operator.openshift.io/v1alpha1
kind: ImageContentSourcePolicy
apiVersion: config.openshift.io/v1
kind: ImageDigestMirrorSet
metadata:
name: mirror-config
spec:
repositoryDigestMirrors:
imageDigestMirrors:
- mirrors:
- cp.stg.icr.io/cp
source: cp.icr.io/cp
Expand All @@ -461,7 +461,7 @@ spec:
EOF
echo
else
echo "ImageContentSourcePolicy to mirror to staging repository already exists."
echo "ImageDigestMirrorSet to mirror to staging repository already exists."
fi
}

Expand Down
7 changes: 4 additions & 3 deletions utils/utils_test.go
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
package utils

import (
appstacksv1 "github.com/application-stacks/runtime-component-operator/api/v1"
"os"
"reflect"
"strconv"
"testing"

appstacksv1 "github.com/application-stacks/runtime-component-operator/api/v1"

"github.com/application-stacks/runtime-component-operator/common"
routev1 "github.com/openshift/api/route/v1"
prometheusv1 "github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring/v1"
Expand Down Expand Up @@ -210,7 +211,7 @@ func partialTestCustomizeNodeAffinity(t *testing.T) {
Preference: corev1.NodeSelectorTerm{
MatchExpressions: []corev1.NodeSelectorRequirement{
{
Key: "failure-domain.beta.kubernetes.io/zone",
Key: "topology.kubernetes.io/zone",
Operator: corev1.NodeSelectorOpIn,
Values: []string{"zoneB"},
},
Expand Down Expand Up @@ -259,7 +260,7 @@ func partialTestCustomizePodAffinity(t *testing.T) {
selectorB := makeInLabelSelector("service", []string{"Service-B"})
// required during scheduling ignored during execution
rDSIDE := []corev1.PodAffinityTerm{
{LabelSelector: &selectorA, TopologyKey: "failure-domain.beta.kubernetes.io/zone"},
{LabelSelector: &selectorA, TopologyKey: "topology.kubernetes.io/zone"},
}
// preferred during scheduling ignored during execution
pDSIDE := []corev1.WeightedPodAffinityTerm{
Expand Down