Skip to content

Commit

Permalink
support namespaces with just numerals in their names (kiali#822)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmazzitelli authored Sep 26, 2024
1 parent d7d771d commit c6e6900
Show file tree
Hide file tree
Showing 141 changed files with 213 additions and 213 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
{% if kiali_vars.deployment.configmap_annotations is defined and kiali_vars.deployment.configmap_annotations|length > 0 %}
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
spec:
{% if kiali_vars.deployment.hpa.spec | length == 0 %}
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/templates/kubernetes/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: {{ kiali_vars.deployment.hpa.api_version }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
spec:
scaleTargetRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: "networking.k8s.io/{{ 'v1' if (lookup(k8s_plugin, kind='Ingress', ap
kind: Ingress
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_vars.deployment.ingress.additional_labels | combine(kiali_resource_metadata_labels) }}
{% if kiali_vars.deployment.ingress.override_yaml is defined and kiali_vars.deployment.ingress.override_yaml.metadata is defined and kiali_vars.deployment.ingress.override_yaml.metadata.annotations is defined %}
{{ kiali_vars.deployment.ingress.override_yaml.metadata | to_nice_yaml(indent=0) | trim | indent(2) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ kiali_vars.deployment.instance_name }}-controlplane
namespace: {{ kiali_vars.istio_namespace }}
namespace: "{{ kiali_vars.istio_namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
{% if kiali_vars.kiali_feature_flags.certificates_information_indicators.enabled|bool == True %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}-viewer
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
- apiGroups: [""]
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/templates/kubernetes/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
- apiGroups: [""]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ kiali_vars.deployment.instance_name }}-controlplane
namespace: {{ kiali_vars.istio_namespace }}
namespace: "{{ kiali_vars.istio_namespace }}"
labels: {{ kiali_resource_metadata_labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -11,4 +11,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_binding_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -13,5 +13,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
{% endfor %}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
annotations:
{% if kiali_vars.server.web_fqdn|length != 0 and kiali_vars.server.web_schema|length != 0 %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ kiali_vars.deployment.instance_name }}-cabundle
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
annotations:
service.beta.openshift.io/inject-cabundle: "true"
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
{% if kiali_vars.deployment.configmap_annotations is defined and kiali_vars.deployment.configmap_annotations|length > 0 %}
annotations:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
spec:
{% if kiali_vars.deployment.hpa.spec | length == 0 %}
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/templates/openshift/hpa.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: {{ kiali_vars.deployment.hpa.api_version }}
kind: HorizontalPodAutoscaler
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
spec:
scaleTargetRef:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ kiali_vars.deployment.instance_name }}-controlplane
namespace: {{ kiali_vars.istio_namespace }}
namespace: "{{ kiali_vars.istio_namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
{% if kiali_vars.kiali_feature_flags.certificates_information_indicators.enabled|bool == True %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}-viewer
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
- apiGroups: [""]
Expand Down
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/templates/openshift/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
rules:
- apiGroups: [""]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ kiali_vars.deployment.instance_name }}-controlplane
namespace: {{ kiali_vars.istio_namespace }}
namespace: "{{ kiali_vars.istio_namespace }}"
labels: {{ kiali_resource_metadata_labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -11,4 +11,4 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: {{ role_binding_kind }}
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ namespace }}
namespace: "{{ namespace }}"
labels: {{ kiali_resource_metadata_labels }}
roleRef:
apiGroup: rbac.authorization.k8s.io
Expand All @@ -13,5 +13,5 @@ roleRef:
subjects:
- kind: ServiceAccount
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
{% endfor %}
2 changes: 1 addition & 1 deletion roles/default/kiali-deploy/templates/openshift/route.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: route.openshift.io/v1
kind: Route
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_vars.deployment.ingress.additional_labels | combine(kiali_resource_metadata_labels) }}
{% if kiali_vars.deployment.ingress.override_yaml is defined and kiali_vars.deployment.ingress.override_yaml.metadata is defined and kiali_vars.deployment.ingress.override_yaml.metadata.annotations is defined %}
{{ kiali_vars.deployment.ingress.override_yaml.metadata | to_nice_yaml(indent=0) | trim | indent(2) }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: {{ kiali_vars.deployment.instance_name }}
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
annotations:
service.beta.openshift.io/serving-cert-secret-name: {{ kiali_vars.deployment.instance_name }}-cert-secret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ kiali_vars.deployment.instance_name }}-service-account
namespace: {{ kiali_vars.deployment.namespace }}
namespace: "{{ kiali_vars.deployment.namespace }}"
labels: {{ kiali_resource_metadata_labels }}
4 changes: 2 additions & 2 deletions roles/default/kiali-remove/tasks/os-resources-to-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ metadata:
apiVersion: route.openshift.io/v1
kind: Route
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}-cabundle
26 changes: 13 additions & 13 deletions roles/default/kiali-remove/tasks/resources-to-remove.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,77 +2,77 @@
apiVersion: {{ kiali_vars_remove.deployment.hpa.api_version }}
kind: HorizontalPodAutoscaler
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: networking.k8s.io/{{ 'v1' if (lookup(k8s_plugin, kind='Ingress', api_version='networking.k8s.io/v1', errors='ignore') is iterable) else 'v1beta1' }}
kind: Ingress
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: v1
kind: ReplicaSet
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: v1
kind: Pod
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: v1
kind: Service
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: v1
kind: ServiceAccount
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}-service-account
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}-viewer
---
apiVersion: v1
kind: ConfigMap
metadata:
namespace: {{ kiali_vars_remove.deployment.namespace }}
namespace: "{{ kiali_vars_remove.deployment.namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
namespace: {{ kiali_vars_remove.istio_namespace }}
namespace: "{{ kiali_vars_remove.istio_namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}-controlplane
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
namespace: {{ kiali_vars_remove.istio_namespace }}
namespace: "{{ kiali_vars_remove.istio_namespace }}"
name: {{ kiali_vars_remove.deployment.instance_name }}-controlplane
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
namespace: {{ ossmconsole_vars.deployment.namespace }}
namespace: "{{ ossmconsole_vars.deployment.namespace }}"
labels: {{ ossmconsole_resource_metadata_labels }}
data:
nginx.conf: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: ConfigMap
metadata:
name: plugin-conf
namespace: {{ ossmconsole_vars.deployment.namespace }}
namespace: "{{ ossmconsole_vars.deployment.namespace }}"
labels: {{ ossmconsole_resource_metadata_labels }}
data:
plugin-config.json: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
backend:
service:
name: ossmconsole
namespace: {{ ossmconsole_vars.deployment.namespace }}
namespace: "{{ ossmconsole_vars.deployment.namespace }}"
port: 9443
basePath: "/"
type: Service
Expand All @@ -18,6 +18,6 @@ spec:
endpoint:
service:
name: {{ ossmconsole_vars.kiali.serviceName }}
namespace: {{ ossmconsole_vars.kiali.serviceNamespace }}
namespace: "{{ ossmconsole_vars.kiali.serviceNamespace }}"
port: {{ ossmconsole_vars.kiali.servicePort }}
type: Service
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: ossmconsole
namespace: {{ ossmconsole_vars.deployment.namespace }}
namespace: "{{ ossmconsole_vars.deployment.namespace }}"
labels: {{ ossmconsole_resource_metadata_labels }}
spec:
replicas: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
kind: Service
metadata:
name: ossmconsole
namespace: {{ ossmconsole_vars.deployment.namespace }}
namespace: "{{ ossmconsole_vars.deployment.namespace }}"
labels: {{ ossmconsole_resource_metadata_labels }}
annotations:
service.beta.openshift.io/serving-cert-secret-name: ossmconsole-cert-secret
Expand Down
Loading

0 comments on commit c6e6900

Please sign in to comment.