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

ConfigMap #36

Closed
GreyGlass1 opened this issue May 16, 2024 · 2 comments
Closed

ConfigMap #36

GreyGlass1 opened this issue May 16, 2024 · 2 comments
Labels
question Further information is requested

Comments

@GreyGlass1
Copy link

Hi, I’ve been testing different options of the solution today with success, except for using the config map to down-scale all deployments. Can you confirm if this is a bug or if there’s an issue with my ConfigMap?

k get configmap py-kube-downscaler -n py-kube-downscaler -oyaml
apiVersion: v1
data:
  DEFAULT_DOWNTIME: Mon-Fri 15:54:-16:00 Europe/London
  EXCLUDE_NAMESPACES:kube-system, py-kube-downscaler
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: kube-downscaler
    meta.helm.sh/release-namespace: py-kube-downscaler
  labels:
    app.kubernetes.io/managed-by: Helm
  name: py-kube-downscaler
  namespace: py-kube-downscaler

Thanks.

@Fovty
Copy link
Member

Fovty commented May 16, 2024

At first glance, the space between the EXCLUDE_NAMESPACES seems to be too much.

EXCLUDE_NAMESPACES:kube-system,py-kube-downscaler

I'll have a closer look tomorrow. Please let me know if this changes anything.

This would refer to:

@Fovty
Copy link
Member

Fovty commented May 17, 2024

Ok, there seem to be some other issues with your config map.

  • Quotes Around Strings: Make sure the values for DEFAULT_DOWNTIME and EXCLUDE_NAMESPACES are quoted properly. This helps avoid issues with parsing times and lists.
  • Spacing and Formatting: Ensure there are no extra spaces or formatting issues. For example, there should be a space after the colon in EXCLUDE_NAMESPACES.
  • The original value had an extra colon before -16:00, which might be a typo. It should be formatted as "Mon-Fri 15:54-16:00 Europe/London".
apiVersion: v1
data:
  DEFAULT_DOWNTIME: "Mon-Fri 15:54-16:00 Europe/London"
  EXCLUDE_NAMESPACES: "kube-system,py-kube-downscaler"
kind: ConfigMap
metadata:
  annotations:
    meta.helm.sh/release-name: kube-downscaler
    meta.helm.sh/release-namespace: py-kube-downscaler
  labels:
    app.kubernetes.io/managed-by: Helm
  name: py-kube-downscaler
  namespace: py-kube-downscaler

This ConfigMap didn't throw any obvious formatting issues on my side

kubectl apply -f path/to/your/configmap.yaml

@JTaeuber JTaeuber added the question Further information is requested label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants