|
2 | 2 | #! SPDX-License-Identifier: Apache-2.0 |
3 | 3 |
|
4 | 4 | #@ load("@ytt:data", "data") |
5 | | -#@ load("@ytt:yaml", "yaml") |
| 5 | +#@ load("@ytt:json", "json") |
6 | 6 | #@ load("helpers.lib.yaml", |
7 | 7 | #@ "defaultLabel", |
8 | 8 | #@ "labels", |
9 | 9 | #@ "deploymentPodLabel", |
10 | 10 | #@ "namespace", |
11 | 11 | #@ "defaultResourceName", |
12 | 12 | #@ "defaultResourceNameWithSuffix", |
| 13 | +#@ "getAndValidateLogLevel", |
13 | 14 | #@ "pinnipedDevAPIGroupWithPrefix", |
14 | | -#@ "getPinnipedConfigMapData", |
15 | 15 | #@ ) |
16 | 16 | #@ load("@ytt:template", "template") |
17 | 17 |
|
@@ -66,10 +66,56 @@ metadata: |
66 | 66 | labels: #@ labels() |
67 | 67 | data: |
68 | 68 | #! If names.apiService is changed in this ConfigMap, must also change name of the ClusterIP Service resource below. |
69 | | - #! aggregatedAPIServerPort may be set here, although other YAML references to the default port (10250) may also need to be updated. |
70 | | - #! impersonationProxyServerPort may be set here, although other YAML references to the default port (8444) may also need to be updated. |
71 | 69 | #@yaml/text-templated-strings |
72 | | - pinniped.yaml: #@ yaml.encode(getPinnipedConfigMapData()) |
| 70 | + pinniped.yaml: | |
| 71 | + discovery: |
| 72 | + url: (@= data.values.discovery_url or "null" @) |
| 73 | + api: |
| 74 | + servingCertificate: |
| 75 | + durationSeconds: (@= str(data.values.api_serving_certificate_duration_seconds) @) |
| 76 | + renewBeforeSeconds: (@= str(data.values.api_serving_certificate_renew_before_seconds) @) |
| 77 | + apiGroupSuffix: (@= data.values.api_group_suffix @) |
| 78 | + # aggregatedAPIServerPort may be set here, although other YAML references to the default port (10250) may also need to be updated |
| 79 | + # impersonationProxyServerPort may be set here, although other YAML references to the default port (8444) may also need to be updated |
| 80 | + aggregatedAPIServerDisableAdmissionPlugins: [] |
| 81 | + names: |
| 82 | + servingCertificateSecret: (@= defaultResourceNameWithSuffix("api-tls-serving-certificate") @) |
| 83 | + credentialIssuer: (@= defaultResourceNameWithSuffix("config") @) |
| 84 | + apiService: (@= defaultResourceNameWithSuffix("api") @) |
| 85 | + impersonationLoadBalancerService: (@= defaultResourceNameWithSuffix("impersonation-proxy-load-balancer") @) |
| 86 | + impersonationClusterIPService: (@= defaultResourceNameWithSuffix("impersonation-proxy-cluster-ip") @) |
| 87 | + impersonationTLSCertificateSecret: (@= defaultResourceNameWithSuffix("impersonation-proxy-tls-serving-certificate") @) |
| 88 | + impersonationCACertificateSecret: (@= defaultResourceNameWithSuffix("impersonation-proxy-ca-certificate") @) |
| 89 | + impersonationSignerSecret: (@= defaultResourceNameWithSuffix("impersonation-proxy-signer-ca-certificate") @) |
| 90 | + agentServiceAccount: (@= defaultResourceNameWithSuffix("kube-cert-agent") @) |
| 91 | + impersonationProxyServiceAccount: (@= defaultResourceNameWithSuffix("impersonation-proxy") @) |
| 92 | + impersonationProxyLegacySecret: (@= defaultResourceNameWithSuffix("impersonation-proxy") @) |
| 93 | + labels: (@= json.encode(labels()).rstrip() @) |
| 94 | + kubeCertAgent: |
| 95 | + namePrefix: (@= defaultResourceNameWithSuffix("kube-cert-agent-") @) |
| 96 | + priorityClassName: (@= data.values.kube_cert_agent_priority_class_name @) |
| 97 | + (@ if data.values.kube_cert_agent_image: @) |
| 98 | + image: (@= data.values.kube_cert_agent_image @) |
| 99 | + (@ else: @) |
| 100 | + (@ if data.values.image_digest: @) |
| 101 | + image: (@= data.values.image_repo + "@" + data.values.image_digest @) |
| 102 | + (@ else: @) |
| 103 | + image: (@= data.values.image_repo + ":" + data.values.image_tag @) |
| 104 | + (@ end @) |
| 105 | + (@ end @) |
| 106 | + (@ if data.values.image_pull_dockerconfigjson: @) |
| 107 | + imagePullSecrets: |
| 108 | + - image-pull-secret |
| 109 | + (@ end @) |
| 110 | + (@ if data.values.log_level: @) |
| 111 | + log: |
| 112 | + level: (@= getAndValidateLogLevel() @) |
| 113 | + (@ end @) |
| 114 | + tls: |
| 115 | + onedottwo: |
| 116 | + allowedCiphers: (@= str(data.values.allowed_ciphers_for_tls_onedottwo) @) |
| 117 | + audit: |
| 118 | + logUsernamesAndGroups: (@= data.values.audit.log_usernames_and_groups @) |
73 | 119 | --- |
74 | 120 | #@ if data.values.image_pull_dockerconfigjson and data.values.image_pull_dockerconfigjson != "": |
75 | 121 | apiVersion: v1 |
|
0 commit comments