check-values.yaml 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. {{- /*
  18. The sole purpose of this yaml file is it to check the values file is consistent for some complexe combinations.
  19. */ -}}
  20. {{- /*
  21. ##############################
  22. Redis related checks
  23. #############################
  24. */ -}}
  25. {{- if or (eq .Values.executor "CeleryExecutor") (eq .Values.executor "CeleryKubernetesExecutor") }}
  26. {{- if .Values.redis.enabled }}
  27. {{- if and .Values.redis.passwordSecretName (not .Values.data.brokerUrlSecretName) }}
  28. {{ required "When using the internal redis of the chart and setting the value redis.passwordSecretName, you must also set the value data.brokerUrlSecretName." nil }}
  29. {{- end }}
  30. {{- if and .Values.redis.passwordSecretName .Values.redis.password }}
  31. {{ required "You must not set both values redis.passwordSecretName and redis.password" nil }}
  32. {{- end }}
  33. {{- else }}
  34. {{- if not (or .Values.data.brokerUrlSecretName .Values.data.brokerUrl) }}
  35. {{ required "You must set one of the values data.brokerUrlSecretName or data.brokerUrl when using a Celery based executor with redis.enabled set to false (we need the url to the redis instance)." nil }}
  36. {{- end }}
  37. {{- end }}
  38. {{- if and .Values.data.brokerUrlSecretName .Values.data.brokerUrl }}
  39. {{ required "You must not set both values data.brokerUrlSecretName and data.brokerUrl" nil }}
  40. {{- end }}
  41. {{- end }}
  42. {{- if .Values.elasticsearch.enabled }}
  43. {{- if and .Values.elasticsearch.secretName .Values.elasticsearch.connection }}
  44. {{ required "You must not set both values elasticsearch.secretName and elasticsearch.connection" nil }}
  45. {{- end }}
  46. {{- if not (or .Values.elasticsearch.secretName .Values.elasticsearch.connection) }}
  47. {{ required "You must set one of the values elasticsearch.secretName or elasticsearch.connection when using a Elasticsearch" nil }}
  48. {{- end }}
  49. {{- end }}