# This is the V3 version of the kustomization.
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../base/backend-config.yaml
- ../base/cloud-endpoint.yaml
- ../base/cluster-role-binding.yaml
- ../base/cluster-role.yaml
- ../base/config-map.yaml
- ../base/deployment.yaml
- ../base/ingress.yaml
- ../base/policy.yaml
- ../base/service-account.yaml
- ../base/service.yaml
- ../base/stateful-set.yaml
- ../overlays/managed-cert/cert.yaml
- ../overlays/application/application.yaml
namespace: istio-system
commonLabels:
  kustomize.component: iap-ingress
images:
- name: gcr.io/kubeflow-images-public/envoy
  newName: gcr.io/kubeflow-images-public/envoy
  newTag: v20180309-0fb4886b463698702b6a08955045731903a18738
- name: gcr.io/kubeflow-images-public/ingress-setup
  newName: gcr.io/kubeflow-images-public/ingress-setup
  newTag: latest
- name: gcr.io/cloud-solutions-group/esp-sample-app
  newName: gcr.io/cloud-solutions-group/esp-sample-app
  newTag: 1.0.0
configMapGenerator:
- name: iap-ingress-config
  literals:
  - appName=kubeflow
  - hostname=
  - ingressName=envoy-ingress
  - ipName=
  - oauthSecretName=kubeflow-oauth
  - project=
  # TODO(jlewi): Do we need this now that we are using workload identity?
  #- adminSaSecretName=admin-gcp-sa
  - tlsSecretName=envoy-ingress-tls
  # TODO(jlewi): Maybe we should use patches instead of vars for this?
  - istioNamespace=istio-system
#generatorOptions:
#  disableNameSuffixHash: true
vars:
# TODO(jlewi): Now that its a separate kustomize package do we need this because
# we will use kustomize to set the namespace?
#- name: namespace
#  objref:
#    kind: ConfigMap
#    name: parameters
#    apiVersion: v1
#  fieldref:
#    fieldpath: data.namespace
- name: appName
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.appName
- name: hostname
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.hostname
- name: ipName
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.ipName
- name: ingressName
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.ingressName
- name: oauthSecretName
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.oauthSecretName
- name: project
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.project
#- name: adminSaSecretName
#  objref:
#    kind: ConfigMap
#    name: iap-ingress-config
#    apiVersion: v1
#  fieldref:
#    fieldpath: data.adminSaSecretName
- name: tlsSecretName
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.tlsSecretName
- name: istioNamespace
  objref:
    kind: ConfigMap
    name: iap-ingress-config
    apiVersion: v1
  fieldref:
    fieldpath: data.istioNamespace
configurations:
- ../base/params.yaml
