Skip to content

Commit

Permalink
Remove the usage of deprecated features
Browse files Browse the repository at this point in the history
  • Loading branch information
halim-lee committed Aug 26, 2024
1 parent f0681bd commit a49b866
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
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

0 comments on commit a49b866

Please sign in to comment.