# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Secret containing ingress TLS cert/key pair
#
# Background: Each environment group has a `route-config` resource. This
# `route-config` configures the ingress routing for `apigee-environment`s
# belonging to that environment group. The `route-config` resource references a
# secret which should contain a cert/key pair which will then be used for
# ingress TLS communication.
#
# Make sure that the cert/key pair corresponds to the hostnames used within the
# environment group.
#
# Refer the comment in `ingress-certificate.yaml` for some additional insight.
apiVersion: v1
kind: Secret
metadata:
  name: "${ORGANIZATION_NAME}-${ENVIRONMENT_GROUP_NAME}"
  namespace: "${APIGEE_NAMESPACE}"
type: Opaque
data:
  cert: |
    ${YOUR_CERT_CHAIN_HERE_BASE64_ENCODED}
  key: |
    ${YOUR_PRIVATE_KEY_HERE_BASE64_ENCODED}