'Condition if or "values" (not "values") in helm

i confuse with condition in helm, i set 2 deployment with 1 deployment create database, 1 deployment create application using range.

{{ range $component := .Values.core_components }}
{{ if or $.Values.deploy (not $component.is_mydb) }}

with my values.yml is:

deploy=true

at values database i set

is_mydb=true This is my values.yml

deploy=true
core_components:
  postgres-core:
    name: postgres-core
    image: postgres
    is_mydb: true

  core-app:
    name: core-app
    image: coreapp

=> It show 2 deployment with helm template "chart" command

when i set deploy=false

=> it show only deployment application name core-app (not show database postgres-core) with helm template "chart" command

Why it show deployment core-app because i think deploy=false it will not show

=> My question is if or $.Values.deploy (not $component.is_mydb) that condition means ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source