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

support namespaces with just numerals in their names #822

Merged
merged 1 commit into from
Sep 26, 2024

Conversation

jmazzitelli
Copy link
Contributor

@jmazzitelli jmazzitelli force-pushed the 7773-numeral-namespace-names branch from 4ea8d97 to 47b5354 Compare September 25, 2024 16:09
@jmazzitelli jmazzitelli marked this pull request as ready for review September 25, 2024 17:06
@jmazzitelli
Copy link
Contributor Author

to test:

  1. have a k8s cluster with istio installed
  2. build and push and deploy everything to the cluster : make -e CLUSTER_TYPE=minikube build build-ui cluster-push operator-create kiali-create
  3. Now create a namespace with just numbers in the name: kubectl create ns 12345
  4. Edit the kiali CR and set CWA=false and include the new namespace in discovery selectors:
kubectl edit kiali kiali -n kiali-operator
spec:
  deployment:
    cluster_wide_access: false
    discovery_selectors:
      default:
      - matchLabels:
        kubernetes.io/metadata.name: "12345"
  1. Everything should install fine now.

Look at the Kiali CR and make sure no errors are in the status field (kubectl get kiali kiali -n kiali-operator -oyaml). Also see that the status.deployment.discoverySelectorNamespaces field includes the new 12345 namespace:

$ kubectl get kiali kiali -n kiali-operator -ojsonpath={.status.deployment} | jq
{
  "discoverySelectorNamespaces": "12345,istio-system",
  "instanceName": "kiali",
  "namespace": "istio-system"
}

Bring up the Kiali UI and confirm that you can namespace 12345:
overview page:
image
graph namespace dropdown:
image

@jmazzitelli
Copy link
Contributor Author

molecule tests pass:

make -e CLUSTER_TYPE=minikube MINIKUBE_PROFILE=ci build cluster-push && \
./hack/run-molecule-tests.sh --client-exe "$(which kubectl)"  \
  --minikube-exe $(which minikube) --minikube-profile ci \
   --cluster-type minikube -udi true
=====================
=== TEST RESULTS: ===
=====================

              accessible-namespaces-test... success [6m 43s]
     affinity-tolerations-resources-test... success [3m 17s]
                cluster-wide-access-test... success [7m 30s]
                      config-values-test... success [2m 22s]
                  default-namespace-test... success [1m 44s]
                            grafana-test... success [3m 11s]
                        header-auth-test... success [1m 39s]
                      instance-name-test... success [2m 2s]
                             jaeger-test... success [2m 24s]
                            metrics-test... success [3m 32s]
                     null-cr-values-test... success [1m 35s]
                only-view-only-mode-test... success [2m 20s]
                             openid-test... success [1m 44s]
                   os-console-links-test... skipped
          ossmconsole-config-values-test... skipped
                 read-certs-secrets-test... success [1m 34s]
                              roles-test... success [4m 47s]
                    rolling-restart-test... success [2m 19s]
                              token-test... success [1m 58s]

Copy link
Contributor

@aljesusg aljesusg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGFM

@aljesusg aljesusg merged commit c6e6900 into kiali:master Sep 26, 2024
1 check passed
@jmazzitelli jmazzitelli deleted the 7773-numeral-namespace-names branch September 26, 2024 12:53
@jshaughn jshaughn added the test: molecule Molecule test infrastructure and tests themselves label Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
requires helm chart PR test: molecule Molecule test infrastructure and tests themselves
Projects
Development

Successfully merging this pull request may close these issues.

support namespaces that just have numbers in their name
3 participants