From ec3e69c5e78ae2c59ea5adb67804ff308c55788c Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:37:29 -0400 Subject: [PATCH 01/13] chore: update cert-manager chart and crds --- pulumi/python/kubernetes/certmgr/__main__.py | 2 +- .../certmgr/manifests/cert-manager.crds.yaml | 285 ++++++++++++++---- 2 files changed, 224 insertions(+), 63 deletions(-) diff --git a/pulumi/python/kubernetes/certmgr/__main__.py b/pulumi/python/kubernetes/certmgr/__main__.py index 6ed1d41f..992b5ece 100644 --- a/pulumi/python/kubernetes/certmgr/__main__.py +++ b/pulumi/python/kubernetes/certmgr/__main__.py @@ -57,7 +57,7 @@ def add_namespace(obj): chart_name = 'cert-manager' chart_version = config.get('chart_version') if not chart_version: - chart_version = 'v1.7.0' + chart_version = 'v1.9.1' helm_repo_name = config.get('certmgr_helm_repo_name') if not helm_repo_name: helm_repo_name = 'jetstack' diff --git a/pulumi/python/kubernetes/certmgr/manifests/cert-manager.crds.yaml b/pulumi/python/kubernetes/certmgr/manifests/cert-manager.crds.yaml index 1df1e068..5b3f0621 100644 --- a/pulumi/python/kubernetes/certmgr/manifests/cert-manager.crds.yaml +++ b/pulumi/python/kubernetes/certmgr/manifests/cert-manager.crds.yaml @@ -1,4 +1,4 @@ -# Copyright 2022 The cert-manager Authors. +# Copyright 2021 The cert-manager Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,20 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. ---- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: certificaterequests.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: cert-manager.io names: @@ -134,7 +131,7 @@ spec: description: Usages is the set of x509 usages that are requested for the certificate. If usages are set they SHOULD be encoded inside the CSR spec Defaults to `digital signature` and `key encipherment` if not specified. type: array items: - description: 'KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 Valid KeyUsage values are as follows: "signing", "digital signature", "content commitment", "key encipherment", "key agreement", "data encipherment", "cert sign", "crl sign", "encipher only", "decipher only", "any", "server auth", "client auth", "code signing", "email protection", "s/mime", "ipsec end system", "ipsec tunnel", "ipsec user", "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc"' + description: 'KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 Valid KeyUsage values are as follows: "signing", "digital signature", "content commitment", "key encipherment", "key agreement", "data encipherment", "cert sign", "crl sign", "encipher only", "decipher only", "any", "server auth", "client auth", "code signing", "email protection", "s/mime", "ipsec end system", "ipsec tunnel", "ipsec user", "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc"' type: string enum: - signing @@ -205,6 +202,9 @@ spec: type: description: Type of the condition, known values are (`Ready`, `InvalidRequest`, `Approved`, `Denied`). type: string + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map failureTime: description: FailureTime stores the time that this CertificateRequest failed. This is used to influence garbage collection and back-off. type: string @@ -212,19 +212,17 @@ spec: served: true storage: true --- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: certificates.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: cert-manager.io names: @@ -284,7 +282,7 @@ spec: - secretName properties: additionalOutputFormats: - description: AdditionalOutputFormats defines extra output formats of the private key and signed certificate chain to be written to this Certificate's target Secret. This is an Alpha Feature and is only enabled with the `--feature-gates=AdditionalCertificateOutputFormats=true` option. + description: AdditionalOutputFormats defines extra output formats of the private key and signed certificate chain to be written to this Certificate's target Secret. This is an Alpha Feature and is only enabled with the `--feature-gates=AdditionalCertificateOutputFormats=true` option on both the controller and webhook components. type: array items: description: CertificateAdditionalOutputFormat defines an additional output format of a Certificate resource. These contain supplementary data formats of the signed certificate chain and paired private key. @@ -388,6 +386,9 @@ spec: name: description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string + literalSubject: + description: LiteralSubject is an LDAP formatted string that represents the [X.509 Subject field](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.6). Use this *instead* of the Subject field if you need to ensure the correct ordering of the RDN sequence, such as when issuing certs for LDAP authentication. See https://github.com/cert-manager/cert-manager/issues/3203, https://github.com/cert-manager/cert-manager/issues/4424. This field is alpha level and is only supported by cert-manager installations where LiteralCertificateSubject feature gate is enabled on both cert-manager controller and webhook. + type: string privateKey: description: Options to control private keys used for the Certificate. type: object @@ -408,6 +409,9 @@ spec: rotationPolicy: description: RotationPolicy controls how private keys should be regenerated when a re-issuance is being processed. If set to Never, a private key will only be generated if one does not already exist in the target `spec.secretName`. If one does exists but it does not have the correct algorithm or size, a warning will be raised to await user intervention. If set to Always, a private key matching the specified requirements will be generated whenever a re-issuance occurs. Default is 'Never' for backward compatibility. type: string + enum: + - Never + - Always size: description: Size is the key bit size of the corresponding private key for this certificate. If `algorithm` is set to `RSA`, valid values are `2048`, `4096` or `8192`, and will default to `2048` if not specified. If `algorithm` is set to `ECDSA`, valid values are `256`, `384` or `521`, and will default to `256` if not specified. If `algorithm` is set to `Ed25519`, Size is ignored. No other values are allowed. type: integer @@ -486,7 +490,7 @@ spec: description: Usages is the set of x509 usages that are requested for the certificate. Defaults to `digital signature` and `key encipherment` if not specified. type: array items: - description: 'KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 Valid KeyUsage values are as follows: "signing", "digital signature", "content commitment", "key encipherment", "key agreement", "data encipherment", "cert sign", "crl sign", "encipher only", "decipher only", "any", "server auth", "client auth", "code signing", "email protection", "s/mime", "ipsec end system", "ipsec tunnel", "ipsec user", "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc"' + description: 'KeyUsage specifies valid usage contexts for keys. See: https://tools.ietf.org/html/rfc5280#section-4.2.1.3 https://tools.ietf.org/html/rfc5280#section-4.2.1.12 Valid KeyUsage values are as follows: "signing", "digital signature", "content commitment", "key encipherment", "key agreement", "data encipherment", "cert sign", "crl sign", "encipher only", "decipher only", "any", "server auth", "client auth", "code signing", "email protection", "s/mime", "ipsec end system", "ipsec tunnel", "ipsec user", "timestamping", "ocsp signing", "microsoft sgc", "netscape sgc"' type: string enum: - signing @@ -550,6 +554,12 @@ spec: type: description: Type of the condition, known values are (`Ready`, `Issuing`). type: string + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map + failedIssuanceAttempts: + description: The number of continuous failed issuance attempts up till now. This field gets removed (if set) on a successful issuance and gets set to 1 if unset and an issuance has failed. If an issuance has failed, the delay till the next issuance will be calculated using formula time.Hour * 2 ^ (failedIssuanceAttempts - 1). + type: integer lastFailureTime: description: LastFailureTime is the time as recorded by the Certificate controller of the most recent failure to complete a CertificateRequest for this Certificate resource. If set, cert-manager will not re-request another Certificate until 1 hour has elapsed from this time. type: string @@ -575,19 +585,17 @@ spec: served: true storage: true --- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: challenges.acme.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: acme.cert-manager.io names: @@ -908,8 +916,20 @@ spec: - region properties: accessKeyID: - description: 'The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: string + accessKeyIDSecretRef: + description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + type: object + required: + - name + properties: + key: + description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. + type: string + name: + description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string hostedZoneID: description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. type: string @@ -920,7 +940,7 @@ spec: description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata type: string secretAccessKeySecretRef: - description: The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials + description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: object required: - name @@ -956,10 +976,49 @@ spec: type: object properties: labels: - description: The labels that cert-manager will use when creating the temporary HTTPRoute needed for solving the HTTP-01 challenge. These labels must match the label selector of at least one Gateway. + description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. type: object additionalProperties: type: string + parentRefs: + description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways' + type: array + items: + description: "ParentRef identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. \n References to objects with invalid Group and Kind are not valid, and must be rejected by the implementation, with appropriate Conditions set on the containing object." + type: object + required: + - name + properties: + group: + description: "Group is the group of the referent. \n Support: Core" + type: string + default: gateway.networking.k8s.io + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + kind: + description: "Kind is kind of the referent. \n Support: Core (Gateway) Support: Custom (Other Resources)" + type: string + default: Gateway + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + name: + description: "Name is the name of the referent. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + namespace: + description: "Namespace is the namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. \n Support: Core" + type: string + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + sectionName: + description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ serviceType: description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. type: string @@ -1187,7 +1246,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -1217,7 +1276,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -1268,7 +1327,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -1298,7 +1357,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -1356,7 +1415,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -1386,7 +1445,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -1437,7 +1496,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -1467,7 +1526,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -1573,19 +1632,17 @@ spec: subresources: status: {} --- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: clusterissuers.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: cert-manager.io names: @@ -1941,8 +1998,20 @@ spec: - region properties: accessKeyID: - description: 'The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: string + accessKeyIDSecretRef: + description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + type: object + required: + - name + properties: + key: + description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. + type: string + name: + description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string hostedZoneID: description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. type: string @@ -1953,7 +2022,7 @@ spec: description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata type: string secretAccessKeySecretRef: - description: The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials + description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: object required: - name @@ -1989,10 +2058,49 @@ spec: type: object properties: labels: - description: The labels that cert-manager will use when creating the temporary HTTPRoute needed for solving the HTTP-01 challenge. These labels must match the label selector of at least one Gateway. + description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. type: object additionalProperties: type: string + parentRefs: + description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways' + type: array + items: + description: "ParentRef identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. \n References to objects with invalid Group and Kind are not valid, and must be rejected by the implementation, with appropriate Conditions set on the containing object." + type: object + required: + - name + properties: + group: + description: "Group is the group of the referent. \n Support: Core" + type: string + default: gateway.networking.k8s.io + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + kind: + description: "Kind is kind of the referent. \n Support: Core (Gateway) Support: Custom (Other Resources)" + type: string + default: Gateway + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + name: + description: "Name is the name of the referent. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + namespace: + description: "Namespace is the namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. \n Support: Core" + type: string + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + sectionName: + description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ serviceType: description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. type: string @@ -2220,7 +2328,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -2250,7 +2358,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -2301,7 +2409,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -2331,7 +2439,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -2389,7 +2497,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -2419,7 +2527,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -2470,7 +2578,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -2500,7 +2608,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -2780,22 +2888,23 @@ spec: type: description: Type of the condition, known values are (`Ready`). type: string + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map served: true storage: true --- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: issuers.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: cert-manager.io names: @@ -3151,8 +3260,20 @@ spec: - region properties: accessKeyID: - description: 'The AccessKeyID is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + description: 'The AccessKeyID is used for authentication. Cannot be set when SecretAccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: string + accessKeyIDSecretRef: + description: 'The SecretAccessKey is used for authentication. If set, pull the AWS access key ID from a key within a Kubernetes Secret. Cannot be set when AccessKeyID is set. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' + type: object + required: + - name + properties: + key: + description: The key of the entry in the Secret resource's `data` field to be used. Some instances of this field may be defaulted, in others it may be required. + type: string + name: + description: 'Name of the resource being referred to. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string hostedZoneID: description: If set, the provider will manage only this zone in Route53 and will not do an lookup using the route53:ListHostedZonesByName api call. type: string @@ -3163,7 +3284,7 @@ spec: description: Role is a Role ARN which the Route53 provider will assume using either the explicit credentials AccessKeyID/SecretAccessKey or the inferred credentials from environment variables, shared credentials file or AWS Instance metadata type: string secretAccessKeySecretRef: - description: The SecretAccessKey is used for authentication. If not set we fall-back to using env vars, shared credentials file or AWS Instance metadata https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials + description: 'The SecretAccessKey is used for authentication. If neither the Access Key nor Key ID are set, we fall-back to using env vars, shared credentials file or AWS Instance metadata, see: https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/configuring-sdk.html#specifying-credentials' type: object required: - name @@ -3199,10 +3320,49 @@ spec: type: object properties: labels: - description: The labels that cert-manager will use when creating the temporary HTTPRoute needed for solving the HTTP-01 challenge. These labels must match the label selector of at least one Gateway. + description: Custom labels that will be applied to HTTPRoutes created by cert-manager while solving HTTP-01 challenges. type: object additionalProperties: type: string + parentRefs: + description: 'When solving an HTTP-01 challenge, cert-manager creates an HTTPRoute. cert-manager needs to know which parentRefs should be used when creating the HTTPRoute. Usually, the parentRef references a Gateway. See: https://gateway-api.sigs.k8s.io/v1alpha2/api-types/httproute/#attaching-to-gateways' + type: array + items: + description: "ParentRef identifies an API object (usually a Gateway) that can be considered a parent of this resource (usually a route). The only kind of parent resource with \"Core\" support is Gateway. This API may be extended in the future to support additional kinds of parent resources, such as HTTPRoute. \n The API object must be valid in the cluster; the Group and Kind must be registered in the cluster for this reference to be valid. \n References to objects with invalid Group and Kind are not valid, and must be rejected by the implementation, with appropriate Conditions set on the containing object." + type: object + required: + - name + properties: + group: + description: "Group is the group of the referent. \n Support: Core" + type: string + default: gateway.networking.k8s.io + maxLength: 253 + pattern: ^$|^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ + kind: + description: "Kind is kind of the referent. \n Support: Core (Gateway) Support: Custom (Other Resources)" + type: string + default: Gateway + maxLength: 63 + minLength: 1 + pattern: ^[a-zA-Z]([-a-zA-Z0-9]*[a-zA-Z0-9])?$ + name: + description: "Name is the name of the referent. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + namespace: + description: "Namespace is the namespace of the referent. When unspecified (or empty string), this refers to the local namespace of the Route. \n Support: Core" + type: string + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + sectionName: + description: "SectionName is the name of a section within the target resource. In the following resources, SectionName is interpreted as the following: \n * Gateway: Listener Name \n Implementations MAY choose to support attaching Routes to other resources. If that is the case, they MUST clearly document how SectionName is interpreted. \n When unspecified (empty string), this will reference the entire resource. For the purpose of status, an attachment is considered successful if at least one section in the parent resource accepts it. For example, Gateway listeners can restrict which Routes can attach to them by Route kind, namespace, or hostname. If 1 of 2 Gateway listeners accept attachment from the referencing Route, the Route MUST be considered successfully attached. If no Gateway listeners accept attachment from this Route, the Route MUST be considered detached from the Gateway. \n Support: Core" + type: string + maxLength: 253 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*$ serviceType: description: Optional service type for Kubernetes solver service. Supported values are NodePort or ClusterIP. If unset, defaults to NodePort. type: string @@ -3430,7 +3590,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -3460,7 +3620,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -3511,7 +3671,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -3541,7 +3701,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -3599,7 +3759,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -3629,7 +3789,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -3680,7 +3840,7 @@ spec: additionalProperties: type: string namespaceSelector: - description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. This field is beta-level and is only honored when PodAffinityNamespaceSelector feature is enabled. + description: A label query over the set of namespaces that the term applies to. The term is applied to the union of the namespaces selected by this field and the ones listed in the namespaces field. null selector and null or empty namespaces list means "this pod's namespace". An empty selector ({}) matches all namespaces. type: object properties: matchExpressions: @@ -3710,7 +3870,7 @@ spec: additionalProperties: type: string namespaces: - description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace" + description: namespaces specifies a static list of namespace names that the term applies to. The term is applied to the union of the namespaces listed in this field and the ones selected by namespaceSelector. null or empty namespaces list and null namespaceSelector means "this pod's namespace". type: array items: type: string @@ -3990,22 +4150,23 @@ spec: type: description: Type of the condition, known values are (`Ready`). type: string + x-kubernetes-list-map-keys: + - type + x-kubernetes-list-type: map served: true storage: true --- -# Source: cert-manager/templates/templates.out +# Source: cert-manager/templates/crd-templates.yaml apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: name: orders.acme.cert-manager.io - annotations: - cert-manager.io/inject-ca-from-secret: 'cert-manager/cert-manager-webhook-ca' labels: app: 'cert-manager' app.kubernetes.io/name: 'cert-manager' app.kubernetes.io/instance: 'cert-manager' # Generated labels - app.kubernetes.io/version: "v1.7.0" + app.kubernetes.io/version: "v1.9.1" spec: group: acme.cert-manager.io names: From 90880d959db304d311e8e14cd1bd959888a0b186 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:37:56 -0400 Subject: [PATCH 02/13] chore: update logagent (filebeat) chart version --- pulumi/python/kubernetes/logagent/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulumi/python/kubernetes/logagent/__main__.py b/pulumi/python/kubernetes/logagent/__main__.py index fdd85769..4b022311 100644 --- a/pulumi/python/kubernetes/logagent/__main__.py +++ b/pulumi/python/kubernetes/logagent/__main__.py @@ -13,7 +13,7 @@ chart_name = 'filebeat' chart_version = config.get('chart_version') if not chart_version: - chart_version = '7.16.3' + chart_version = '7.17.3' helm_repo_name = config.get('helm_repo_name') if not helm_repo_name: helm_repo_name = 'elastic' From 0b0a57e1779cdbeae6c2a5a26aee8b2644bce004 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:40:35 -0400 Subject: [PATCH 03/13] chore: update nginx IC to latest chart version --- pulumi/python/kubernetes/nginx/ingress-controller/__main__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulumi/python/kubernetes/nginx/ingress-controller/__main__.py b/pulumi/python/kubernetes/nginx/ingress-controller/__main__.py index 03d9608b..0cb4ba95 100644 --- a/pulumi/python/kubernetes/nginx/ingress-controller/__main__.py +++ b/pulumi/python/kubernetes/nginx/ingress-controller/__main__.py @@ -17,7 +17,7 @@ chart_name = 'nginx-ingress' chart_version = config.get('chart_version') if not chart_version: - chart_version = '0.13.2' + chart_version = '0.14.0' helm_repo_name = config.get('helm_repo_name') if not helm_repo_name: helm_repo_name = 'nginx-stable' From 32c80803409ffe14fe94d53812b62915db41c420 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:40:58 -0400 Subject: [PATCH 04/13] chore: update prometheus chart to latest version --- pulumi/python/kubernetes/prometheus/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulumi/python/kubernetes/prometheus/__main__.py b/pulumi/python/kubernetes/prometheus/__main__.py index c29d27c0..69969fb7 100644 --- a/pulumi/python/kubernetes/prometheus/__main__.py +++ b/pulumi/python/kubernetes/prometheus/__main__.py @@ -66,7 +66,7 @@ def extract_adminpass_from_k8s_secrets(secrets: Mapping[str, str]) -> str: chart_name = 'kube-prometheus-stack' chart_version = config.get('chart_version') if not chart_version: - chart_version = '30.0.1' + chart_version = '39.2.1' helm_repo_name = config.get('prometheus_helm_repo_name') if not helm_repo_name: helm_repo_name = 'prometheus-community' @@ -207,7 +207,7 @@ def extract_adminpass_from_k8s_secrets(secrets: Mapping[str, str]) -> str: statsd_chart_name = 'prometheus-statsd-exporter' statsd_chart_version = config.get('statsd_chart_version') if not statsd_chart_version: - statsd_chart_version = '0.4.2' + statsd_chart_version = '0.5.0' helm_repo_name = config.get('prometheus_helm_repo_name') if not helm_repo_name: helm_repo_name = 'prometheus-community' From cf5cacd21f699e2d21784f24e788f520987f3deb Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:41:20 -0400 Subject: [PATCH 05/13] chore: update logstore (Elasticsearch) to latest chart versoin --- pulumi/python/kubernetes/logstore/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulumi/python/kubernetes/logstore/__main__.py b/pulumi/python/kubernetes/logstore/__main__.py index 874c0b22..a736500a 100644 --- a/pulumi/python/kubernetes/logstore/__main__.py +++ b/pulumi/python/kubernetes/logstore/__main__.py @@ -13,7 +13,7 @@ chart_name = 'elasticsearch' chart_version = config.get('chart_version') if not chart_version: - chart_version = '17.6.2' + chart_version = '19.1.4' helm_repo_name = config.get('helm_repo_name') if not helm_repo_name: helm_repo_name = 'bitnami' @@ -131,7 +131,7 @@ def project_name_from_project_dir(dirname: str): elastic_rname = elastic_release.status.name -elastic_fqdn = Output.concat(elastic_rname, "-coordinating-only.logstore.svc.cluster.local") +elastic_fqdn = Output.concat(elastic_rname, "-elasticsearch.logstore.svc.cluster.local") kibana_fqdn = Output.concat(elastic_rname, "-kibana.logstore.svc.cluster.local") pulumi.export('elastic_hostname', pulumi.Output.unsecret(elastic_fqdn)) From 8c05f3fc2e25b13254f090cbaa591b98761e6182 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:42:02 -0400 Subject: [PATCH 06/13] chore: update observability to new yaml and new chart --- .../otel-objects/otel-collector.yaml | 17 +- .../otel-operator/opentelemetry-operator.yaml | 1614 ++++++++++++----- 2 files changed, 1131 insertions(+), 500 deletions(-) diff --git a/pulumi/python/kubernetes/observability/otel-objects/otel-collector.yaml b/pulumi/python/kubernetes/observability/otel-objects/otel-collector.yaml index a7069297..fed12a4f 100644 --- a/pulumi/python/kubernetes/observability/otel-objects/otel-collector.yaml +++ b/pulumi/python/kubernetes/observability/otel-objects/otel-collector.yaml @@ -12,20 +12,17 @@ spec: endpoint: 0.0.0.0:9978 http: endpoint: 0.0.0.0:9979 - # Collect Prometheus Metrics - exporters: - otlp: - endpoint: https://ingest.lightstep.com:443 - headers: {"lightstep-service-name":"my-service","lightstep-access-token":"XXXX"} + processors: batch: + + exporters: + logging: + logLevel: + service: pipelines: traces: receivers: [otlp] processors: [batch] - exporters: [otlp] - metrics: - receivers: [otlp] - processors: [batch] - exporters: [otlp] + exporters: [logging] diff --git a/pulumi/python/kubernetes/observability/otel-operator/opentelemetry-operator.yaml b/pulumi/python/kubernetes/observability/otel-operator/opentelemetry-operator.yaml index b48e156e..7459e064 100644 --- a/pulumi/python/kubernetes/observability/otel-operator/opentelemetry-operator.yaml +++ b/pulumi/python/kubernetes/observability/otel-operator/opentelemetry-operator.yaml @@ -2,6 +2,7 @@ apiVersion: v1 kind: Namespace metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: opentelemetry-operator-system --- @@ -9,8 +10,10 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: instrumentations.opentelemetry.io spec: group: opentelemetry.io @@ -28,6 +31,15 @@ spec: - jsonPath: .metadata.creationTimestamp name: Age type: date + - jsonPath: .spec.exporter.endpoint + name: Endpoint + type: string + - jsonPath: .spec.sampler.type + name: Sampler + type: string + - jsonPath: .spec.sampler.argument + name: Sampler Arg + type: string name: v1alpha1 schema: openAPIV3Schema: @@ -49,6 +61,115 @@ spec: description: InstrumentationSpec defines the desired state of OpenTelemetry SDK and instrumentation. properties: + env: + description: 'Env defines common env vars. There are four layers for + env vars'' definitions and the precedence order is: `original container + env vars` > `language specific env vars` > `common env vars` > `instrument + spec configs'' vars`. If the former var had been defined, then the + other vars would be ignored.' + items: + description: EnvVar represents an environment variable present in + a Container. + properties: + name: + description: Name of the environment variable. Must be a C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded using + the previously defined environment variables in the container + and any service environment variables. If a variable cannot + be resolved, the reference in the input string will be unchanged. + Double $$ are reduced to a single $, which allows for escaping + the $(VAR_NAME) syntax: i.e. "$$(VAR_NAME)" will produce the + string literal "$(VAR_NAME)". Escaped references will never + be expanded, regardless of whether the variable exists or + not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. Cannot + be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the ConfigMap or its key + must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, `metadata.annotations['''']`, + spec.nodeName, spec.serviceAccountName, status.hostIP, + status.podIP, status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath is + written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the specified + API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the exposed + resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, uid?' + type: string + optional: + description: Specify whether the Secret or its key must + be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array exporter: description: Exporter defines exporter configuration. properties: @@ -59,6 +180,120 @@ spec: java: description: Java defines configuration for java auto-instrumentation. properties: + env: + description: 'Env defines java specific env vars. There are four + layers for env vars'' definitions and the precedence order is: + `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with javaagent auto-instrumentation JAR. @@ -67,6 +302,120 @@ spec: nodejs: description: NodeJS defines configuration for nodejs auto-instrumentation. properties: + env: + description: 'Env defines nodejs specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with NodeJS SDK and auto-instrumentation. type: string @@ -90,6 +439,120 @@ spec: python: description: Python defines configuration for python auto-instrumentation. properties: + env: + description: 'Env defines python specific env vars. There are + four layers for env vars'' definitions and the precedence order + is: `original container env vars` > `language specific env vars` + > `common env vars` > `instrument spec configs'' vars`. If the + former var had been defined, then the other vars would be ignored.' + items: + description: EnvVar represents an environment variable present + in a Container. + properties: + name: + description: Name of the environment variable. Must be a + C_IDENTIFIER. + type: string + value: + description: 'Variable references $(VAR_NAME) are expanded + using the previously defined environment variables in + the container and any service environment variables. If + a variable cannot be resolved, the reference in the input + string will be unchanged. Double $$ are reduced to a single + $, which allows for escaping the $(VAR_NAME) syntax: i.e. + "$$(VAR_NAME)" will produce the string literal "$(VAR_NAME)". + Escaped references will never be expanded, regardless + of whether the variable exists or not. Defaults to "".' + type: string + valueFrom: + description: Source for the environment variable's value. + Cannot be used if value is not empty. + properties: + configMapKeyRef: + description: Selects a key of a ConfigMap. + properties: + key: + description: The key to select. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the ConfigMap or its + key must be defined + type: boolean + required: + - key + type: object + fieldRef: + description: 'Selects a field of the pod: supports metadata.name, + metadata.namespace, `metadata.labels['''']`, + `metadata.annotations['''']`, spec.nodeName, + spec.serviceAccountName, status.hostIP, status.podIP, + status.podIPs.' + properties: + apiVersion: + description: Version of the schema the FieldPath + is written in terms of, defaults to "v1". + type: string + fieldPath: + description: Path of the field to select in the + specified API version. + type: string + required: + - fieldPath + type: object + resourceFieldRef: + description: 'Selects a resource of the container: only + resources limits and requests (limits.cpu, limits.memory, + limits.ephemeral-storage, requests.cpu, requests.memory + and requests.ephemeral-storage) are currently supported.' + properties: + containerName: + description: 'Container name: required for volumes, + optional for env vars' + type: string + divisor: + anyOf: + - type: integer + - type: string + description: Specifies the output format of the + exposed resources, defaults to "1" + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + resource: + description: 'Required: resource to select' + type: string + required: + - resource + type: object + secretKeyRef: + description: Selects a key of a secret in the pod's + namespace + properties: + key: + description: The key of the secret to select from. Must + be a valid secret key. + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names + TODO: Add other useful fields. apiVersion, kind, + uid?' + type: string + optional: + description: Specify whether the Secret or its key + must be defined + type: boolean + required: + - key + type: object + type: object + required: + - name + type: object + type: array image: description: Image is a container image with Python SDK and auto-instrumentation. type: string @@ -152,7 +615,9 @@ kind: CustomResourceDefinition metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert - controller-gen.kubebuilder.io/version: v0.6.0-beta.0 + controller-gen.kubebuilder.io/version: v0.8.0 + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetrycollectors.opentelemetry.io spec: group: opentelemetry.io @@ -364,6 +829,16 @@ spec: description: ImagePullPolicy indicates the pull policy to be used for retrieving the container image (Always, Never, IfNotPresent) type: string + maxReplicas: + description: MaxReplicas sets an upper bound to the autoscaling feature. + If MaxReplicas is set autoscaling is enabled. + format: int32 + type: integer + minReplicas: + description: MinReplicas sets a lower bound to the autoscaling feature. Set + this if your are using autoscaling. It must be at least 1 + format: int32 + type: integer mode: description: Mode represents how the collector should be deployed (deployment, daemonset, statefulset or sidecar) @@ -373,6 +848,13 @@ spec: - sidecar - statefulset type: string + nodeSelector: + additionalProperties: + type: string + description: NodeSelector to schedule OpenTelemetry Collector pods. + This is only relevant to daemonset, statefulset, and deployment + mode + type: object podAnnotations: additionalProperties: type: string @@ -393,7 +875,8 @@ spec: set (new files created in the volume will be owned by FSGroup) 3. The permission bits are OR'd with rw-rw---- \n If unset, the Kubelet will not modify the ownership and permissions of - any volume." + any volume. Note that this field cannot be set when spec.os.name + is windows." format: int64 type: integer fsGroupChangePolicy: @@ -403,13 +886,15 @@ spec: support fsGroup based ownership(and permissions). It will have no effect on ephemeral volume types such as: secret, configmaps and emptydir. Valid values are "OnRootMismatch" and "Always". - If not specified, "Always" is used.' + If not specified, "Always" is used. Note that this field cannot + be set when spec.os.name is windows.' type: string runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -426,7 +911,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence for that container. + takes precedence for that container. Note that this field cannot + be set when spec.os.name is windows. format: int64 type: integer seLinuxOptions: @@ -435,6 +921,7 @@ spec: SELinux context for each container. May also be set in SecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext takes precedence for that container. + Note that this field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -455,7 +942,8 @@ spec: type: object seccompProfile: description: The seccomp options to use by the containers in this - pod. + pod. Note that this field cannot be set when spec.os.name is + windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -477,7 +965,8 @@ spec: supplementalGroups: description: A list of groups applied to the first process run in each container, in addition to the container's primary GID. If - unspecified, no groups will be added to any container. + unspecified, no groups will be added to any container. Note + that this field cannot be set when spec.os.name is windows. items: format: int64 type: integer @@ -485,7 +974,8 @@ spec: sysctls: description: Sysctls hold a list of namespaced sysctls used for the pod. Pods with unsupported sysctls (by the container runtime) - might fail to launch. + might fail to launch. Note that this field cannot be set when + spec.os.name is windows. items: description: Sysctl defines a kernel parameter to be set properties: @@ -504,7 +994,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options within a container's SecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -549,7 +1040,7 @@ spec: description: The application protocol for this port. This field follows standard Kubernetes label syntax. Un-prefixed names are reserved for IANA standard service names (as per RFC-6335 - and http://www.iana.org/assignments/service-names). Non-standard + and https://www.iana.org/assignments/service-names). Non-standard protocols should use prefixed names such as mycompany.com/my-custom-protocol. type: string name: @@ -600,7 +1091,7 @@ spec: x-kubernetes-list-type: atomic replicas: description: Replicas is the number of pod instances for the underlying - OpenTelemetry Collector + OpenTelemetry Collector. Set this if your are not using autoscaling format: int32 type: integer resources: @@ -638,12 +1129,14 @@ spec: can gain more privileges than its parent process. This bool directly controls if the no_new_privs flag will be set on the container process. AllowPrivilegeEscalation is true always when - the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN' + the container is: 1) run as Privileged 2) has CAP_SYS_ADMIN + Note that this field cannot be set when spec.os.name is windows.' type: boolean capabilities: description: The capabilities to add/drop when running containers. Defaults to the default set of capabilities granted by the container - runtime. + runtime. Note that this field cannot be set when spec.os.name + is windows. properties: add: description: Added capabilities @@ -661,23 +1154,27 @@ spec: privileged: description: Run container in privileged mode. Processes in privileged containers are essentially equivalent to root on the host. Defaults - to false. + to false. Note that this field cannot be set when spec.os.name + is windows. type: boolean procMount: description: procMount denotes the type of proc mount to use for the containers. The default is DefaultProcMount which uses the container runtime defaults for readonly paths and masked paths. This requires the ProcMountType feature flag to be enabled. + Note that this field cannot be set when spec.os.name is windows. type: string readOnlyRootFilesystem: description: Whether this container has a read-only root filesystem. - Default is false. + Default is false. Note that this field cannot be set when spec.os.name + is windows. type: boolean runAsGroup: description: The GID to run the entrypoint of the container process. Uses runtime default if unset. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. format: int64 type: integer runAsNonRoot: @@ -694,7 +1191,8 @@ spec: Defaults to user specified in image metadata if unspecified. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value specified in SecurityContext - takes precedence. + takes precedence. Note that this field cannot be set when spec.os.name + is windows. format: int64 type: integer seLinuxOptions: @@ -702,7 +1200,8 @@ spec: If unspecified, the container runtime will allocate a random SELinux context for each container. May also be set in PodSecurityContext. If set in both SecurityContext and PodSecurityContext, the value - specified in SecurityContext takes precedence. + specified in SecurityContext takes precedence. Note that this + field cannot be set when spec.os.name is windows. properties: level: description: Level is SELinux level label that applies to @@ -724,7 +1223,8 @@ spec: seccompProfile: description: The seccomp options to use by this container. If seccomp options are provided at both the pod & container level, - the container options override the pod options. + the container options override the pod options. Note that this + field cannot be set when spec.os.name is windows. properties: localhostProfile: description: localhostProfile indicates a profile defined @@ -747,7 +1247,8 @@ spec: description: The Windows specific settings applied to all containers. If unspecified, the options from the PodSecurityContext will be used. If set in both SecurityContext and PodSecurityContext, - the value specified in SecurityContext takes precedence. + the value specified in SecurityContext takes precedence. Note + that this field cannot be set when spec.os.name is linux. properties: gmsaCredentialSpec: description: GMSACredentialSpec is where the GMSA admission @@ -795,10 +1296,27 @@ spec: description: Image indicates the container image to use for the OpenTelemetry TargetAllocator. type: string + prometheusCR: + description: PrometheusCR defines the configuration for the retrieval + of PrometheusOperator CRDs ( servicemonitor.monitoring.coreos.com/v1 + and podmonitor.monitoring.coreos.com/v1 ) retrieval. All CR + instances which the ServiceAccount has access to will be retrieved. + This includes other namespaces. + properties: + enabled: + description: Enabled indicates whether to use a PrometheusOperator + custom resources as targets or not. + type: boolean + type: object + serviceAccount: + description: ServiceAccount indicates the name of an existing + service account to use with this instance. + type: string type: object tolerations: description: Toleration to schedule OpenTelemetry Collector pods. - This is only relevant to daemonsets, statefulsets and deployments + This is only relevant to daemonset, statefulset, and deployment + mode items: description: The pod this Toleration is attached to tolerates any taint that matches the triple using the matching @@ -884,17 +1402,17 @@ spec: type: string type: object spec: - description: 'Spec defines the desired characteristics of a + description: 'spec defines the desired characteristics of a volume requested by a pod author. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the desired access modes + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify either: + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support the specified data @@ -920,26 +1438,27 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to populate - the volume with data, if a non-empty volume is desired. - This may be any local object from a non-empty API group - (non core object) or a PersistentVolumeClaim object. When - this field is specified, volume binding will only succeed - if the type of the specified object matches some installed - volume populator or dynamic provisioner. This field will - replace the functionality of the DataSource field and - as such if both fields are non-empty, they must have the - same value. For backwards compatibility, both fields (DataSource - and DataSourceRef) will be set to the same value automatically - if one of them is empty and the other is non-empty. There - are two important differences between DataSource and DataSourceRef: - * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as well as - PersistentVolumeClaim objects. * While DataSource ignores - disallowed values (dropping them), DataSourceRef preserves - all values, and generates an error if a disallowed value - is specified. (Alpha) Using this field requires the - AnyVolumeDataSource feature gate to be enabled.' + description: 'dataSourceRef specifies the object from which + to populate the volume with data, if a non-empty volume + is desired. This may be any local object from a non-empty + API group (non core object) or a PersistentVolumeClaim + object. When this field is specified, volume binding will + only succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. + This field will replace the functionality of the DataSource + field and as such if both fields are non-empty, they must + have the same value. For backwards compatibility, both + fields (DataSource and DataSourceRef) will be set to the + same value automatically if one of them is empty and the + other is non-empty. There are two important differences + between DataSource and DataSourceRef: * While DataSource + only allows two specific types of objects, DataSourceRef + allows any non-core object, as well as PersistentVolumeClaim + objects. * While DataSource ignores disallowed values + (dropping them), DataSourceRef preserves all values, and + generates an error if a disallowed value is specified. + (Beta) Using this field requires the AnyVolumeDataSource + feature gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -958,8 +1477,12 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify resource + requirements that are lower than previous value but must + still be higher than capacity recorded in the status field + of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: @@ -986,8 +1509,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider for - binding. + description: selector is a label query over volumes to consider + for binding. properties: matchExpressions: description: matchExpressions is a list of label selector @@ -1032,8 +1555,8 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required by the claim. - More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the StorageClass + required by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume is required @@ -1041,20 +1564,40 @@ spec: included in claim spec. type: string volumeName: - description: VolumeName is the binding reference to the + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object status: - description: 'Status represents the current information/status + description: 'status represents the current information/status of a persistent volume claim. Read-only. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: accessModes: - description: 'AccessModes contains the actual access modes + description: 'accessModes contains the actual access modes the volume backing the PVC has. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array + allocatedResources: + additionalProperties: + anyOf: + - type: integer + - type: string + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + description: allocatedResources is the storage resource + within AllocatedResources tracks the capacity allocated + to a PVC. It may be larger than the actual capacity when + a volume expansion operation is requested. For storage + quota, the larger value from allocatedResources and PVC.spec.resources + is used. If allocatedResources is not set, PVC.spec.resources + alone is used for quota calculation. If a volume expansion + capacity request is lowered, allocatedResources is only + lowered if there are no expansion operations in progress + and if the actual volume capacity is equal or lower than + the requested capacity. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. + type: object capacity: additionalProperties: anyOf: @@ -1062,36 +1605,37 @@ spec: - type: string pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true - description: Represents the actual resources of the underlying - volume. + description: capacity represents the actual resources of + the underlying volume. type: object conditions: - description: Current Condition of persistent volume claim. - If underlying persistent volume is being resized then - the Condition will be set to 'ResizeStarted'. + description: conditions is the current Condition of persistent + volume claim. If underlying persistent volume is being + resized then the Condition will be set to 'ResizeStarted'. items: description: PersistentVolumeClaimCondition contails details about state of pvc properties: lastProbeTime: - description: Last time we probed the condition. + description: lastProbeTime is the time we probed the + condition. format: date-time type: string lastTransitionTime: - description: Last time the condition transitioned - from one status to another. + description: lastTransitionTime is the time the condition + transitioned from one status to another. format: date-time type: string message: - description: Human-readable message indicating details - about last transition. + description: message is the human-readable message + indicating details about last transition. type: string reason: - description: Unique, this should be a short, machine - understandable string that gives the reason for - condition's last transition. If it reports "ResizeStarted" - that means the underlying persistent volume is being - resized. + description: reason is a unique, this should be a + short, machine understandable string that gives + the reason for condition's last transition. If it + reports "ResizeStarted" that means the underlying + persistent volume is being resized. type: string status: type: string @@ -1105,7 +1649,14 @@ spec: type: object type: array phase: - description: Phase represents the current phase of PersistentVolumeClaim. + description: phase represents the current phase of PersistentVolumeClaim. + type: string + resizeStatus: + description: resizeStatus stores status of resize operation. + ResizeStatus is not set by default but when expansion + is complete resizeStatus is set to empty string by resize + controller or kubelet. This is an alpha field and requires + enabling RecoverVolumeExpansionFailure feature. type: string type: object type: object @@ -1160,117 +1711,121 @@ spec: be accessed by any container in the pod. properties: awsElasticBlockStore: - description: 'AWSElasticBlockStore represents an AWS Disk resource + description: 'awsElasticBlockStore represents an AWS Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty).' + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty).' format: int32 type: integer readOnly: - description: 'Specify "true" to force and set the ReadOnly - property in VolumeMounts to "true". If omitted, the default - is "false". More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'readOnly value true will force the readOnly + setting in VolumeMounts. More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: boolean volumeID: - description: 'Unique ID of the persistent disk resource - in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' + description: 'volumeID is unique ID of the persistent disk + resource in AWS (Amazon EBS volume). More info: https://kubernetes.io/docs/concepts/storage/volumes#awselasticblockstore' type: string required: - volumeID type: object azureDisk: - description: AzureDisk represents an Azure Data Disk mount on + description: azureDisk represents an Azure Data Disk mount on the host and bind mount to the pod. properties: cachingMode: - description: 'Host Caching mode: None, Read Only, Read Write.' + description: 'cachingMode is the Host Caching mode: None, + Read Only, Read Write.' type: string diskName: - description: The Name of the data disk in the blob storage + description: diskName is the Name of the data disk in the + blob storage type: string diskURI: - description: The URI the data disk in the blob storage + description: diskURI is the URI of data disk in the blob + storage type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is Filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string kind: - description: 'Expected values Shared: multiple blob disks - per storage account Dedicated: single blob disk per storage - account Managed: azure managed data disk (only in managed - availability set). defaults to shared' + description: 'kind expected values are Shared: multiple + blob disks per storage account Dedicated: single blob + disk per storage account Managed: azure managed data + disk (only in managed availability set). defaults to shared' type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean required: - diskName - diskURI type: object azureFile: - description: AzureFile represents an Azure File Service mount + description: azureFile represents an Azure File Service mount on the host and bind mount to the pod. properties: readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretName: - description: the name of secret that contains Azure Storage - Account Name and Key + description: secretName is the name of secret that contains + Azure Storage Account Name and Key type: string shareName: - description: Share Name + description: shareName is the azure share Name type: string required: - secretName - shareName type: object cephfs: - description: CephFS represents a Ceph FS mount on the host that + description: cephFS represents a Ceph FS mount on the host that shares a pod's lifetime properties: monitors: - description: 'Required: Monitors is a collection of Ceph - monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'monitors is Required: Monitors is a collection + of Ceph monitors More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' items: type: string type: array path: - description: 'Optional: Used as the mounted root, rather - than the full Ceph tree, default is /' + description: 'path is Optional: Used as the mounted root, + rather than the full Ceph tree, default is /' type: string readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: boolean secretFile: - description: 'Optional: SecretFile is the path to key ring - for User, default is /etc/ceph/user.secret More info: - https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretFile is Optional: SecretFile is the + path to key ring for User, default is /etc/ceph/user.secret + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string secretRef: - description: 'Optional: SecretRef is reference to the authentication - secret for User, default is empty. More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'secretRef is Optional: SecretRef is reference + to the authentication secret for User, default is empty. + More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1278,30 +1833,30 @@ spec: type: string type: object user: - description: 'Optional: User is the rados user name, default - is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' + description: 'user is optional: User is the rados user name, + default is admin More info: https://examples.k8s.io/volumes/cephfs/README.md#how-to-use-it' type: string required: - monitors type: object cinder: - description: 'Cinder represents a cinder volume attached and + description: 'cinder represents a cinder volume attached and mounted on kubelets host machine. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Examples: - "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" - if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Examples: "ext4", "xfs", "ntfs". Implicitly inferred to + be "ext4" if unspecified. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string readOnly: - description: 'Optional: Defaults to false (read/write). - ReadOnly here will force the ReadOnly setting in VolumeMounts. + description: 'readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: boolean secretRef: - description: 'Optional: points to a secret object containing - parameters used to connect to OpenStack.' + description: 'secretRef is optional: points to a secret + object containing parameters used to connect to OpenStack.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1309,31 +1864,31 @@ spec: type: string type: object volumeID: - description: 'volume id used to identify the volume in cinder. + description: 'volumeID used to identify the volume in cinder. More info: https://examples.k8s.io/mysql-cinder-pd/README.md' type: string required: - volumeID type: object configMap: - description: ConfigMap represents a configMap that should populate + description: configMap represents a configMap that should populate this volume properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced ConfigMap will be projected + description: items if unspecified, each key-value pair in + the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -1345,25 +1900,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -1375,28 +1930,28 @@ spec: TODO: Add other useful fields. apiVersion, kind, uid?' type: string optional: - description: Specify whether the ConfigMap or its keys must - be defined + description: optional specify whether the ConfigMap or its + keys must be defined type: boolean type: object csi: - description: CSI (Container Storage Interface) represents ephemeral + description: csi (Container Storage Interface) represents ephemeral storage that is handled by certain external CSI drivers (Beta feature). properties: driver: - description: Driver is the name of the CSI driver that handles + description: driver is the name of the CSI driver that handles this volume. Consult with your admin for the correct name as registered in the cluster. type: string fsType: - description: Filesystem type to mount. Ex. "ext4", "xfs", - "ntfs". If not provided, the empty value is passed to - the associated CSI driver which will determine the default - filesystem to apply. + description: fsType to mount. Ex. "ext4", "xfs", "ntfs". + If not provided, the empty value is passed to the associated + CSI driver which will determine the default filesystem + to apply. type: string nodePublishSecretRef: - description: NodePublishSecretRef is a reference to the + description: nodePublishSecretRef is a reference to the secret object containing sensitive information to pass to the CSI driver to complete the CSI NodePublishVolume and NodeUnpublishVolume calls. This field is optional, @@ -1410,13 +1965,13 @@ spec: type: string type: object readOnly: - description: Specifies a read-only configuration for the - volume. Defaults to false (read/write). + description: readOnly specifies a read-only configuration + for the volume. Defaults to false (read/write). type: boolean volumeAttributes: additionalProperties: type: string - description: VolumeAttributes stores driver-specific properties + description: volumeAttributes stores driver-specific properties that are passed to the CSI driver. Consult your driver's documentation for supported values. type: object @@ -1424,7 +1979,7 @@ spec: - driver type: object downwardAPI: - description: DownwardAPI represents downward API about the pod + description: downwardAPI represents downward API about the pod that should populate this volume properties: defaultMode: @@ -1511,50 +2066,47 @@ spec: type: array type: object emptyDir: - description: 'EmptyDir represents a temporary directory that + description: 'emptyDir represents a temporary directory that shares a pod''s lifetime. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' properties: medium: - description: 'What type of storage medium should back this - directory. The default is "" which means to use the node''s - default medium. Must be an empty string (default) or Memory. - More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' + description: 'medium represents what type of storage medium + should back this directory. The default is "" which means + to use the node''s default medium. Must be an empty string + (default) or Memory. More info: https://kubernetes.io/docs/concepts/storage/volumes#emptydir' type: string sizeLimit: anyOf: - type: integer - type: string - description: 'Total amount of local storage required for - this EmptyDir volume. The size limit is also applicable - for memory medium. The maximum usage on memory medium - EmptyDir would be the minimum value between the SizeLimit - specified here and the sum of memory limits of all containers - in a pod. The default is nil which means that the limit - is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' + description: 'sizeLimit is the total amount of local storage + required for this EmptyDir volume. The size limit is also + applicable for memory medium. The maximum usage on memory + medium EmptyDir would be the minimum value between the + SizeLimit specified here and the sum of memory limits + of all containers in a pod. The default is nil which means + that the limit is undefined. More info: http://kubernetes.io/docs/user-guide/volumes#emptydir' pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ x-kubernetes-int-or-string: true type: object ephemeral: - description: "Ephemeral represents a volume that is handled + description: "ephemeral represents a volume that is handled by a cluster storage driver. The volume's lifecycle is tied to the pod that defines it - it will be created before the pod starts, and deleted when the pod is removed. \n Use this if: a) the volume is only needed while the pod runs, b) features of normal volumes like restoring from snapshot or capacity - \ tracking are needed, c) the storage driver is specified - through a storage class, and d) the storage driver supports - dynamic volume provisioning through a PersistentVolumeClaim - (see EphemeralVolumeSource for more information on the - connection between this volume type and PersistentVolumeClaim). - \n Use PersistentVolumeClaim or one of the vendor-specific - APIs for volumes that persist for longer than the lifecycle - of an individual pod. \n Use CSI for light-weight local ephemeral - volumes if the CSI driver is meant to be used that way - see - the documentation of the driver for more information. \n A - pod can use both types of ephemeral volumes and persistent - volumes at the same time. \n This is a beta feature and only - available when the GenericEphemeralVolume feature gate is - enabled." + tracking are needed, c) the storage driver is specified through + a storage class, and d) the storage driver supports dynamic + volume provisioning through a PersistentVolumeClaim (see EphemeralVolumeSource + for more information on the connection between this volume + type and PersistentVolumeClaim). \n Use PersistentVolumeClaim + or one of the vendor-specific APIs for volumes that persist + for longer than the lifecycle of an individual pod. \n Use + CSI for light-weight local ephemeral volumes if the CSI driver + is meant to be used that way - see the documentation of the + driver for more information. \n A pod can use both types of + ephemeral volumes and persistent volumes at the same time." properties: volumeClaimTemplate: description: "Will be used to create a stand-alone PVC to @@ -1606,13 +2158,13 @@ spec: as in a PersistentVolumeClaim are also valid here. properties: accessModes: - description: 'AccessModes contains the desired access + description: 'accessModes contains the desired access modes the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#access-modes-1' items: type: string type: array dataSource: - description: 'This field can be used to specify + description: 'dataSource field can be used to specify either: * An existing VolumeSnapshot object (snapshot.storage.k8s.io/VolumeSnapshot) * An existing PVC (PersistentVolumeClaim) If the provisioner or an external controller can support @@ -1642,14 +2194,14 @@ spec: - name type: object dataSourceRef: - description: 'Specifies the object from which to - populate the volume with data, if a non-empty - volume is desired. This may be any local object - from a non-empty API group (non core object) or - a PersistentVolumeClaim object. When this field - is specified, volume binding will only succeed - if the type of the specified object matches some - installed volume populator or dynamic provisioner. + description: 'dataSourceRef specifies the object + from which to populate the volume with data, if + a non-empty volume is desired. This may be any + local object from a non-empty API group (non core + object) or a PersistentVolumeClaim object. When + this field is specified, volume binding will only + succeed if the type of the specified object matches + some installed volume populator or dynamic provisioner. This field will replace the functionality of the DataSource field and as such if both fields are non-empty, they must have the same value. For @@ -1659,13 +2211,13 @@ spec: other is non-empty. There are two important differences between DataSource and DataSourceRef: * While DataSource only allows two specific types of objects, - DataSourceRef allows any non-core object, as - well as PersistentVolumeClaim objects. * While - DataSource ignores disallowed values (dropping - them), DataSourceRef preserves all values, and - generates an error if a disallowed value is specified. - (Alpha) Using this field requires the AnyVolumeDataSource - feature gate to be enabled.' + DataSourceRef allows any non-core object, as well + as PersistentVolumeClaim objects. * While DataSource + ignores disallowed values (dropping them), DataSourceRef + preserves all values, and generates an error if + a disallowed value is specified. (Beta) Using + this field requires the AnyVolumeDataSource feature + gate to be enabled.' properties: apiGroup: description: APIGroup is the group for the resource @@ -1687,8 +2239,12 @@ spec: - name type: object resources: - description: 'Resources represents the minimum resources - the volume should have. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' + description: 'resources represents the minimum resources + the volume should have. If RecoverVolumeExpansionFailure + feature is enabled users are allowed to specify + resource requirements that are lower than previous + value but must still be higher than capacity recorded + in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources' properties: limits: additionalProperties: @@ -1716,8 +2272,8 @@ spec: type: object type: object selector: - description: A label query over volumes to consider - for binding. + description: selector is a label query over volumes + to consider for binding. properties: matchExpressions: description: matchExpressions is a list of label @@ -1767,8 +2323,9 @@ spec: type: object type: object storageClassName: - description: 'Name of the StorageClass required - by the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' + description: 'storageClassName is the name of the + StorageClass required by the claim. More info: + https://kubernetes.io/docs/concepts/storage/persistent-volumes#class-1' type: string volumeMode: description: volumeMode defines what type of volume @@ -1776,7 +2333,7 @@ spec: is implied when not included in claim spec. type: string volumeName: - description: VolumeName is the binding reference + description: volumeName is the binding reference to the PersistentVolume backing this claim. type: string type: object @@ -1785,32 +2342,33 @@ spec: type: object type: object fc: - description: FC represents a Fibre Channel resource that is + description: fc represents a Fibre Channel resource that is attached to a kubelet's host machine and then exposed to the pod. properties: fsType: - description: 'Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. - TODO: how do we prevent errors in the filesystem from - compromising the machine' + description: 'fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. TODO: how do we prevent errors in the + filesystem from compromising the machine' type: string lun: - description: 'Optional: FC target lun number' + description: 'lun is Optional: FC target lun number' format: int32 type: integer readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: Defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean targetWWNs: - description: 'Optional: FC target worldwide names (WWNs)' + description: 'targetWWNs is Optional: FC target worldwide + names (WWNs)' items: type: string type: array wwids: - description: 'Optional: FC volume world wide identifiers + description: 'wwids Optional: FC volume world wide identifiers (wwids) Either wwids or combination of targetWWNs and lun must be set, but not both simultaneously.' items: @@ -1818,34 +2376,36 @@ spec: type: array type: object flexVolume: - description: FlexVolume represents a generic volume resource + description: flexVolume represents a generic volume resource that is provisioned/attached using an exec based plugin. properties: driver: - description: Driver is the name of the driver to use for + description: driver is the name of the driver to use for this volume. type: string fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". The default filesystem depends on FlexVolume - script. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". The default filesystem depends + on FlexVolume script. type: string options: additionalProperties: type: string - description: 'Optional: Extra command options if any.' + description: 'options is Optional: this field holds extra + command options if any.' type: object readOnly: - description: 'Optional: Defaults to false (read/write). + description: 'readOnly is Optional: defaults to false (read/write). ReadOnly here will force the ReadOnly setting in VolumeMounts.' type: boolean secretRef: - description: 'Optional: SecretRef is reference to the secret - object containing sensitive information to pass to the - plugin scripts. This may be empty if no secret object - is specified. If the secret object contains more than - one secret, all secrets are passed to the plugin scripts.' + description: 'secretRef is Optional: secretRef is reference + to the secret object containing sensitive information + to pass to the plugin scripts. This may be empty if no + secret object is specified. If the secret object contains + more than one secret, all secrets are passed to the plugin + scripts.' properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -1856,90 +2416,92 @@ spec: - driver type: object flocker: - description: Flocker represents a Flocker volume attached to + description: flocker represents a Flocker volume attached to a kubelet's host machine. This depends on the Flocker control service being running properties: datasetName: - description: Name of the dataset stored as metadata -> name - on the dataset for Flocker should be considered as deprecated + description: datasetName is Name of the dataset stored as + metadata -> name on the dataset for Flocker should be + considered as deprecated type: string datasetUUID: - description: UUID of the dataset. This is unique identifier - of a Flocker dataset + description: datasetUUID is the UUID of the dataset. This + is unique identifier of a Flocker dataset type: string type: object gcePersistentDisk: - description: 'GCEPersistentDisk represents a GCE Disk resource + description: 'gcePersistentDisk represents a GCE Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: 'fsType is filesystem type of the volume that + you want to mount. Tip: Ensure that the filesystem type + is supported by the host operating system. Examples: "ext4", + "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk TODO: how do we prevent errors in the filesystem from compromising the machine' type: string partition: - description: 'The partition in the volume that you want - to mount. If omitted, the default is to mount by volume - name. Examples: For volume /dev/sda1, you specify the - partition as "1". Similarly, the volume partition for - /dev/sda is "0" (or you can leave the property empty). + description: 'partition is the partition in the volume that + you want to mount. If omitted, the default is to mount + by volume name. Examples: For volume /dev/sda1, you specify + the partition as "1". Similarly, the volume partition + for /dev/sda is "0" (or you can leave the property empty). More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' format: int32 type: integer pdName: - description: 'Unique name of the PD resource in GCE. Used - to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' + description: 'pdName is unique name of the PD resource in + GCE. Used to identify the disk in GCE. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#gcepersistentdisk' type: boolean required: - pdName type: object gitRepo: - description: 'GitRepo represents a git repository at a particular + description: 'gitRepo represents a git repository at a particular revision. DEPRECATED: GitRepo is deprecated. To provision a container with a git repo, mount an EmptyDir into an InitContainer that clones the repo using git, then mount the EmptyDir into the Pod''s container.' properties: directory: - description: Target directory name. Must not contain or - start with '..'. If '.' is supplied, the volume directory - will be the git repository. Otherwise, if specified, - the volume will contain the git repository in the subdirectory - with the given name. + description: directory is the target directory name. Must + not contain or start with '..'. If '.' is supplied, the + volume directory will be the git repository. Otherwise, + if specified, the volume will contain the git repository + in the subdirectory with the given name. type: string repository: - description: Repository URL + description: repository is the URL type: string revision: - description: Commit hash for the specified revision. + description: revision is the commit hash for the specified + revision. type: string required: - repository type: object glusterfs: - description: 'Glusterfs represents a Glusterfs mount on the + description: 'glusterfs represents a Glusterfs mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/glusterfs/README.md' properties: endpoints: - description: 'EndpointsName is the endpoint name that details + description: 'endpoints is the endpoint name that details Glusterfs topology. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string path: - description: 'Path is the Glusterfs volume path. More info: + description: 'path is the Glusterfs volume path. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: string readOnly: - description: 'ReadOnly here will force the Glusterfs volume + description: 'readOnly here will force the Glusterfs volume to be mounted with read-only permissions. Defaults to false. More info: https://examples.k8s.io/volumes/glusterfs/README.md#create-a-pod' type: boolean @@ -1948,7 +2510,7 @@ spec: - path type: object hostPath: - description: 'HostPath represents a pre-existing file or directory + description: 'hostPath represents a pre-existing file or directory on the host machine that is directly exposed to the container. This is generally used for system agents or other privileged things that are allowed to see the host machine. Most containers @@ -1957,68 +2519,70 @@ spec: mounts and who can/can not mount host directories as read/write.' properties: path: - description: 'Path of the directory on the host. If the + description: 'path of the directory on the host. If the path is a symlink, it will follow the link to the real path. More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string type: - description: 'Type for HostPath Volume Defaults to "" More + description: 'type for HostPath Volume Defaults to "" More info: https://kubernetes.io/docs/concepts/storage/volumes#hostpath' type: string required: - path type: object iscsi: - description: 'ISCSI represents an ISCSI Disk resource that is + description: 'iscsi represents an ISCSI Disk resource that is attached to a kubelet''s host machine and then exposed to the pod. More info: https://examples.k8s.io/volumes/iscsi/README.md' properties: chapAuthDiscovery: - description: whether support iSCSI Discovery CHAP authentication + description: chapAuthDiscovery defines whether support iSCSI + Discovery CHAP authentication type: boolean chapAuthSession: - description: whether support iSCSI Session CHAP authentication + description: chapAuthSession defines whether support iSCSI + Session CHAP authentication type: boolean fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#iscsi TODO: how do we prevent errors in the filesystem from compromising the machine' type: string initiatorName: - description: Custom iSCSI Initiator Name. If initiatorName - is specified with iscsiInterface simultaneously, new iSCSI - interface : will be created - for the connection. + description: initiatorName is the custom iSCSI Initiator + Name. If initiatorName is specified with iscsiInterface + simultaneously, new iSCSI interface : will be created for the connection. type: string iqn: - description: Target iSCSI Qualified Name. + description: iqn is the target iSCSI Qualified Name. type: string iscsiInterface: - description: iSCSI Interface Name that uses an iSCSI transport. - Defaults to 'default' (tcp). + description: iscsiInterface is the interface Name that uses + an iSCSI transport. Defaults to 'default' (tcp). type: string lun: - description: iSCSI Target Lun number. + description: lun represents iSCSI Target Lun number. format: int32 type: integer portals: - description: iSCSI Target Portal List. The portal is either - an IP or ip_addr:port if the port is other than default - (typically TCP ports 860 and 3260). + description: portals is the iSCSI Target Portal List. The + portal is either an IP or ip_addr:port if the port is + other than default (typically TCP ports 860 and 3260). items: type: string type: array readOnly: - description: ReadOnly here will force the ReadOnly setting + description: readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. type: boolean secretRef: - description: CHAP Secret for iSCSI target and initiator - authentication + description: secretRef is the CHAP Secret for iSCSI target + and initiator authentication properties: name: description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names @@ -2026,9 +2590,9 @@ spec: type: string type: object targetPortal: - description: iSCSI Target Portal. The Portal is either an - IP or ip_addr:port if the port is other than default (typically - TCP ports 860 and 3260). + description: targetPortal is iSCSI Target Portal. The Portal + is either an IP or ip_addr:port if the port is other than + default (typically TCP ports 860 and 3260). type: string required: - iqn @@ -2036,24 +2600,24 @@ spec: - targetPortal type: object name: - description: 'Volume''s name. Must be a DNS_LABEL and unique + description: 'name of the volume. Must be a DNS_LABEL and unique within the pod. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' type: string nfs: - description: 'NFS represents an NFS mount on the host that shares + description: 'nfs represents an NFS mount on the host that shares a pod''s lifetime More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' properties: path: - description: 'Path that is exported by the NFS server. More + description: 'path that is exported by the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string readOnly: - description: 'ReadOnly here will force the NFS export to + description: 'readOnly here will force the NFS export to be mounted with read-only permissions. Defaults to false. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: boolean server: - description: 'Server is the hostname or IP address of the + description: 'server is the hostname or IP address of the NFS server. More info: https://kubernetes.io/docs/concepts/storage/volumes#nfs' type: string required: @@ -2061,86 +2625,87 @@ spec: - server type: object persistentVolumeClaim: - description: 'PersistentVolumeClaimVolumeSource represents a + description: 'persistentVolumeClaimVolumeSource represents a reference to a PersistentVolumeClaim in the same namespace. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' properties: claimName: - description: 'ClaimName is the name of a PersistentVolumeClaim + description: 'claimName is the name of a PersistentVolumeClaim in the same namespace as the pod using this volume. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#persistentvolumeclaims' type: string readOnly: - description: Will force the ReadOnly setting in VolumeMounts. - Default false. + description: readOnly Will force the ReadOnly setting in + VolumeMounts. Default false. type: boolean required: - claimName type: object photonPersistentDisk: - description: PhotonPersistentDisk represents a PhotonController + description: photonPersistentDisk represents a PhotonController persistent disk attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string pdID: - description: ID that identifies Photon Controller persistent - disk + description: pdID is the ID that identifies Photon Controller + persistent disk type: string required: - pdID type: object portworxVolume: - description: PortworxVolume represents a portworx volume attached + description: portworxVolume represents a portworx volume attached and mounted on kubelets host machine properties: fsType: - description: FSType represents the filesystem type to mount + description: fSType represents the filesystem type to mount Must be a filesystem type supported by the host operating system. Ex. "ext4", "xfs". Implicitly inferred to be "ext4" if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean volumeID: - description: VolumeID uniquely identifies a Portworx volume + description: volumeID uniquely identifies a Portworx volume type: string required: - volumeID type: object projected: - description: Items for all in one resources secrets, configmaps, - and downward API + description: projected items for all in one resources secrets, + configmaps, and downward API properties: defaultMode: - description: Mode bits used to set permissions on created - files by default. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML accepts - both octal and decimal values, JSON requires decimal values - for mode bits. Directories within the path are not affected - by this setting. This might be in conflict with other - options that affect the file mode, like fsGroup, and the - result can be other mode bits set. + description: defaultMode are the mode bits used to set permissions + on created files by default. Must be an octal value between + 0000 and 0777 or a decimal value between 0 and 511. YAML + accepts both octal and decimal values, JSON requires decimal + values for mode bits. Directories within the path are + not affected by this setting. This might be in conflict + with other options that affect the file mode, like fsGroup, + and the result can be other mode bits set. format: int32 type: integer sources: - description: list of volume projections + description: sources is the list of volume projections items: description: Projection that may be projected along with other supported volume types properties: configMap: - description: information about the configMap data - to project + description: configMap information about the configMap + data to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced ConfigMap + description: items if unspecified, each key-value + pair in the Data field of the referenced ConfigMap will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected @@ -2155,27 +2720,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2189,13 +2755,13 @@ spec: uid?' type: string optional: - description: Specify whether the ConfigMap or - its keys must be defined + description: optional specify whether the ConfigMap + or its keys must be defined type: boolean type: object downwardAPI: - description: information about the downwardAPI data - to project + description: downwardAPI information about the downwardAPI + data to project properties: items: description: Items is a list of DownwardAPIVolume @@ -2276,15 +2842,15 @@ spec: type: array type: object secret: - description: information about the secret data to - project + description: secret information about the secret data + to project properties: items: - description: If unspecified, each key-value pair - in the Data field of the referenced Secret will - be projected into the volume as a file whose - name is the key and content is the value. If - specified, the listed keys will be projected + description: items if unspecified, each key-value + pair in the Data field of the referenced Secret + will be projected into the volume as a file + whose name is the key and content is the value. + If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be present. If a key is specified which is not present in the Secret, the volume setup @@ -2296,27 +2862,28 @@ spec: a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to - set permissions on this file. Must be - an octal value between 0000 and 0777 or - a decimal value between 0 and 511. YAML - accepts both octal and decimal values, - JSON requires decimal values for mode - bits. If not specified, the volume defaultMode - will be used. This might be in conflict - with other options that affect the file - mode, like fsGroup, and the result can - be other mode bits set.' + description: 'mode is Optional: mode bits + used to set permissions on this file. + Must be an octal value between 0000 and + 0777 or a decimal value between 0 and + 511. YAML accepts both octal and decimal + values, JSON requires decimal values for + mode bits. If not specified, the volume + defaultMode will be used. This might be + in conflict with other options that affect + the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file - to map the key to. May not be an absolute - path. May not contain the path element - '..'. May not start with the string '..'. + description: path is the relative path of + the file to map the key to. May not be + an absolute path. May not contain the + path element '..'. May not start with + the string '..'. type: string required: - key @@ -2330,16 +2897,16 @@ spec: uid?' type: string optional: - description: Specify whether the Secret or its - key must be defined + description: optional field specify whether the + Secret or its key must be defined type: boolean type: object serviceAccountToken: - description: information about the serviceAccountToken - data to project + description: serviceAccountToken is information about + the serviceAccountToken data to project properties: audience: - description: Audience is the intended audience + description: audience is the intended audience of the token. A recipient of a token must identify itself with an identifier specified in the audience of the token, and otherwise should reject the @@ -2347,7 +2914,7 @@ spec: of the apiserver. type: string expirationSeconds: - description: ExpirationSeconds is the requested + description: expirationSeconds is the requested duration of validity of the service account token. As the token approaches expiration, the kubelet volume plugin will proactively rotate @@ -2359,7 +2926,7 @@ spec: format: int64 type: integer path: - description: Path is the path relative to the + description: path is the path relative to the mount point of the file to project the token into. type: string @@ -2370,35 +2937,35 @@ spec: type: array type: object quobyte: - description: Quobyte represents a Quobyte mount on the host + description: quobyte represents a Quobyte mount on the host that shares a pod's lifetime properties: group: - description: Group to map volume access to Default is no + description: group to map volume access to Default is no group type: string readOnly: - description: ReadOnly here will force the Quobyte volume + description: readOnly here will force the Quobyte volume to be mounted with read-only permissions. Defaults to false. type: boolean registry: - description: Registry represents a single or multiple Quobyte + description: registry represents a single or multiple Quobyte Registry services specified as a string as host:port pair (multiple entries are separated with commas) which acts as the central registry for volumes type: string tenant: - description: Tenant owning the given Quobyte volume in the + description: tenant owning the given Quobyte volume in the Backend Used with dynamically provisioned Quobyte volumes, value is set by the plugin type: string user: - description: User to map volume access to Defaults to serivceaccount + description: user to map volume access to Defaults to serivceaccount user type: string volume: - description: Volume is a string that references an already + description: volume is a string that references an already created Quobyte volume by name. type: string required: @@ -2406,41 +2973,42 @@ spec: - volume type: object rbd: - description: 'RBD represents a Rados Block Device mount on the + description: 'rbd represents a Rados Block Device mount on the host that shares a pod''s lifetime. More info: https://examples.k8s.io/volumes/rbd/README.md' properties: fsType: - description: 'Filesystem type of the volume that you want - to mount. Tip: Ensure that the filesystem type is supported - by the host operating system. Examples: "ext4", "xfs", - "ntfs". Implicitly inferred to be "ext4" if unspecified. - More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd + description: 'fsType is the filesystem type of the volume + that you want to mount. Tip: Ensure that the filesystem + type is supported by the host operating system. Examples: + "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. More info: https://kubernetes.io/docs/concepts/storage/volumes#rbd TODO: how do we prevent errors in the filesystem from compromising the machine' type: string image: - description: 'The rados image name. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'image is the rados image name. More info: + https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string keyring: - description: 'Keyring is the path to key ring for RBDUser. + description: 'keyring is the path to key ring for RBDUser. Default is /etc/ceph/keyring. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string monitors: - description: 'A collection of Ceph monitors. More info: - https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'monitors is a collection of Ceph monitors. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' items: type: string type: array pool: - description: 'The rados pool name. Default is rbd. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'pool is the rados pool name. Default is rbd. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string readOnly: - description: 'ReadOnly here will force the ReadOnly setting + description: 'readOnly here will force the ReadOnly setting in VolumeMounts. Defaults to false. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: boolean secretRef: - description: 'SecretRef is name of the authentication secret + description: 'secretRef is name of the authentication secret for RBDUser. If provided overrides keyring. Default is nil. More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' properties: @@ -2450,35 +3018,36 @@ spec: type: string type: object user: - description: 'The rados user name. Default is admin. More - info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' + description: 'user is the rados user name. Default is admin. + More info: https://examples.k8s.io/volumes/rbd/README.md#how-to-use-it' type: string required: - image - monitors type: object scaleIO: - description: ScaleIO represents a ScaleIO persistent volume + description: scaleIO represents a ScaleIO persistent volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Default is "xfs". + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Default is "xfs". type: string gateway: - description: The host address of the ScaleIO API Gateway. + description: gateway is the host address of the ScaleIO + API Gateway. type: string protectionDomain: - description: The name of the ScaleIO Protection Domain for - the configured storage. + description: protectionDomain is the name of the ScaleIO + Protection Domain for the configured storage. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly Defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef references to the secret for ScaleIO + description: secretRef references to the secret for ScaleIO user and other sensitive information. If this is not provided, Login operation will fail. properties: @@ -2488,25 +3057,26 @@ spec: type: string type: object sslEnabled: - description: Flag to enable/disable SSL communication with - Gateway, default false + description: sslEnabled Flag enable/disable SSL communication + with Gateway, default false type: boolean storageMode: - description: Indicates whether the storage for a volume - should be ThickProvisioned or ThinProvisioned. Default - is ThinProvisioned. + description: storageMode indicates whether the storage for + a volume should be ThickProvisioned or ThinProvisioned. + Default is ThinProvisioned. type: string storagePool: - description: The ScaleIO Storage Pool associated with the - protection domain. + description: storagePool is the ScaleIO Storage Pool associated + with the protection domain. type: string system: - description: The name of the storage system as configured - in ScaleIO. + description: system is the name of the storage system as + configured in ScaleIO. type: string volumeName: - description: The name of a volume already created in the - ScaleIO system that is associated with this volume source. + description: volumeName is the name of a volume already + created in the ScaleIO system that is associated with + this volume source. type: string required: - gateway @@ -2514,24 +3084,24 @@ spec: - system type: object secret: - description: 'Secret represents a secret that should populate + description: 'secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' properties: defaultMode: - description: 'Optional: mode bits used to set permissions - on created files by default. Must be an octal value between - 0000 and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires decimal - values for mode bits. Defaults to 0644. Directories within - the path are not affected by this setting. This might - be in conflict with other options that affect the file - mode, like fsGroup, and the result can be other mode bits - set.' + description: 'defaultMode is Optional: mode bits used to + set permissions on created files by default. Must be an + octal value between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. Defaults to + 0644. Directories within the path are not affected by + this setting. This might be in conflict with other options + that affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer items: - description: If unspecified, each key-value pair in the - Data field of the referenced Secret will be projected + description: items If unspecified, each key-value pair in + the Data field of the referenced Secret will be projected into the volume as a file whose name is the key and content is the value. If specified, the listed keys will be projected into the specified paths, and unlisted keys will not be @@ -2543,25 +3113,25 @@ spec: description: Maps a string key to a path within a volume. properties: key: - description: The key to project. + description: key is the key to project. type: string mode: - description: 'Optional: mode bits used to set permissions - on this file. Must be an octal value between 0000 - and 0777 or a decimal value between 0 and 511. YAML - accepts both octal and decimal values, JSON requires - decimal values for mode bits. If not specified, - the volume defaultMode will be used. This might - be in conflict with other options that affect the - file mode, like fsGroup, and the result can be other - mode bits set.' + description: 'mode is Optional: mode bits used to + set permissions on this file. Must be an octal value + between 0000 and 0777 or a decimal value between + 0 and 511. YAML accepts both octal and decimal values, + JSON requires decimal values for mode bits. If not + specified, the volume defaultMode will be used. + This might be in conflict with other options that + affect the file mode, like fsGroup, and the result + can be other mode bits set.' format: int32 type: integer path: - description: The relative path of the file to map - the key to. May not be an absolute path. May not - contain the path element '..'. May not start with - the string '..'. + description: path is the relative path of the file + to map the key to. May not be an absolute path. + May not contain the path element '..'. May not start + with the string '..'. type: string required: - key @@ -2569,29 +3139,30 @@ spec: type: object type: array optional: - description: Specify whether the Secret or its keys must - be defined + description: optional field specify whether the Secret or + its keys must be defined type: boolean secretName: - description: 'Name of the secret in the pod''s namespace - to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' + description: 'secretName is the name of the secret in the + pod''s namespace to use. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret' type: string type: object storageos: - description: StorageOS represents a StorageOS volume attached + description: storageOS represents a StorageOS volume attached and mounted on Kubernetes nodes. properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is the filesystem type to mount. Must + be a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string readOnly: - description: Defaults to false (read/write). ReadOnly here - will force the ReadOnly setting in VolumeMounts. + description: readOnly defaults to false (read/write). ReadOnly + here will force the ReadOnly setting in VolumeMounts. type: boolean secretRef: - description: SecretRef specifies the secret to use for obtaining + description: secretRef specifies the secret to use for obtaining the StorageOS API credentials. If not specified, default values will be attempted. properties: @@ -2601,12 +3172,12 @@ spec: type: string type: object volumeName: - description: VolumeName is the human-readable name of the + description: volumeName is the human-readable name of the StorageOS volume. Volume names are only unique within a namespace. type: string volumeNamespace: - description: VolumeNamespace specifies the scope of the + description: volumeNamespace specifies the scope of the volume within StorageOS. If no namespace is specified then the Pod's namespace will be used. This allows the Kubernetes name scoping to be mirrored within StorageOS @@ -2617,24 +3188,26 @@ spec: type: string type: object vsphereVolume: - description: VsphereVolume represents a vSphere volume attached + description: vsphereVolume represents a vSphere volume attached and mounted on kubelets host machine properties: fsType: - description: Filesystem type to mount. Must be a filesystem - type supported by the host operating system. Ex. "ext4", - "xfs", "ntfs". Implicitly inferred to be "ext4" if unspecified. + description: fsType is filesystem type to mount. Must be + a filesystem type supported by the host operating system. + Ex. "ext4", "xfs", "ntfs". Implicitly inferred to be "ext4" + if unspecified. type: string storagePolicyID: - description: Storage Policy Based Management (SPBM) profile - ID associated with the StoragePolicyName. + description: storagePolicyID is the storage Policy Based + Management (SPBM) profile ID associated with the StoragePolicyName. type: string storagePolicyName: - description: Storage Policy Based Management (SPBM) profile - name. + description: storagePolicyName is the storage Policy Based + Management (SPBM) profile name. type: string volumePath: - description: Path that identifies vSphere volume vmdk + description: volumePath is the path that identifies vSphere + volume vmdk type: string required: - volumePath @@ -2650,17 +3223,32 @@ spec: OpenTelemetryCollector. properties: messages: - description: Messages about actions performed by the operator on this - resource. + description: 'Messages about actions performed by the operator on + this resource. Deprecated: use Kubernetes events instead.' items: type: string type: array x-kubernetes-list-type: atomic replicas: - description: Replicas is currently not being set and might be removed - in the next version. + description: 'Replicas is currently not being set and might be removed + in the next version. Deprecated: use "OpenTelemetryCollector.Status.Scale.Replicas" + instead.' format: int32 type: integer + scale: + description: Scale is the OpenTelemetryCollector's scale subresource + status. + properties: + replicas: + description: The total number non-terminated pods targeted by + this OpenTelemetryCollector's deployment or statefulSet. + format: int32 + type: integer + selector: + description: The selector used to match the OpenTelemetryCollector's + deployment or statefulSet pods. + type: string + type: object version: description: Version of the managed OpenTelemetry Collector (operand) type: string @@ -2670,8 +3258,9 @@ spec: storage: true subresources: scale: + labelSelectorPath: .status.scale.selector specReplicasPath: .spec.replicas - statusReplicasPath: .status.replicas + statusReplicasPath: .status.scale.replicas status: {} status: acceptedNames: @@ -2683,12 +3272,16 @@ status: apiVersion: v1 kind: ServiceAccount metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-controller-manager namespace: opentelemetry-operator-system --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-leader-election-role namespace: opentelemetry-operator-system rules: @@ -2724,6 +3317,8 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: creationTimestamp: null + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-manager-role rules: - apiGroups: @@ -2820,6 +3415,18 @@ rules: - patch - update - watch +- apiGroups: + - autoscaling + resources: + - horizontalpodautoscalers + verbs: + - create + - delete + - get + - list + - patch + - update + - watch - apiGroups: - coordination.k8s.io resources: @@ -2871,6 +3478,8 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-metrics-reader rules: - nonResourceURLs: @@ -2881,6 +3490,8 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-proxy-role rules: - apiGroups: @@ -2899,6 +3510,8 @@ rules: apiVersion: rbac.authorization.k8s.io/v1 kind: RoleBinding metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-leader-election-rolebinding namespace: opentelemetry-operator-system roleRef: @@ -2913,6 +3526,8 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-manager-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io @@ -2926,6 +3541,8 @@ subjects: apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRoleBinding metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-proxy-rolebinding roleRef: apiGroup: rbac.authorization.k8s.io @@ -2940,6 +3557,7 @@ apiVersion: v1 kind: Service metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: opentelemetry-operator-controller-manager-metrics-service namespace: opentelemetry-operator-system @@ -2950,11 +3568,14 @@ spec: protocol: TCP targetPort: https selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager --- apiVersion: v1 kind: Service metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-webhook-service namespace: opentelemetry-operator-system spec: @@ -2963,12 +3584,14 @@ spec: protocol: TCP targetPort: 9443 selector: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager --- apiVersion: apps/v1 kind: Deployment metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager name: opentelemetry-operator-controller-manager namespace: opentelemetry-operator-system @@ -2976,17 +3599,19 @@ spec: replicas: 1 selector: matchLabels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager template: metadata: labels: + app.kubernetes.io/name: opentelemetry-operator control-plane: controller-manager spec: containers: - args: - --metrics-addr=127.0.0.1:8080 - --enable-leader-election - image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:v0.42.0 + image: ghcr.io/open-telemetry/opentelemetry-operator/opentelemetry-operator:0.56.0 livenessProbe: httpGet: path: /healthz @@ -3019,13 +3644,20 @@ spec: - --secure-listen-address=0.0.0.0:8443 - --upstream=http://127.0.0.1:8080/ - --logtostderr=true - - --v=10 - image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + - --v=0 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.11.0 name: kube-rbac-proxy ports: - containerPort: 8443 name: https protocol: TCP + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 5m + memory: 64Mi serviceAccountName: opentelemetry-operator-controller-manager terminationGracePeriodSeconds: 10 volumes: @@ -3037,6 +3669,8 @@ spec: apiVersion: cert-manager.io/v1 kind: Certificate metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-serving-cert namespace: opentelemetry-operator-system spec: @@ -3054,6 +3688,8 @@ spec: apiVersion: cert-manager.io/v1 kind: Issuer metadata: + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-selfsigned-issuer namespace: opentelemetry-operator-system spec: @@ -3064,11 +3700,12 @@ kind: MutatingWebhookConfiguration metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-mutating-webhook-configuration webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3089,7 +3726,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3110,7 +3746,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3135,11 +3770,12 @@ kind: ValidatingWebhookConfiguration metadata: annotations: cert-manager.io/inject-ca-from: opentelemetry-operator-system/opentelemetry-operator-serving-cert + labels: + app.kubernetes.io/name: opentelemetry-operator name: opentelemetry-operator-validating-webhook-configuration webhooks: - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3160,7 +3796,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3180,7 +3815,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3201,7 +3835,6 @@ webhooks: sideEffects: None - admissionReviewVersions: - v1 - - v1beta1 clientConfig: service: name: opentelemetry-operator-webhook-service @@ -3219,3 +3852,4 @@ webhooks: resources: - opentelemetrycollectors sideEffects: None + From b03aba99c3d915358e8500ca837c616c1f061bf8 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Mon, 1 Aug 2022 17:42:22 -0400 Subject: [PATCH 07/13] chore: update example config with new values --- config/pulumi/Pulumi.stackname.yaml.example | 26 ++++++++++----------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/config/pulumi/Pulumi.stackname.yaml.example b/config/pulumi/Pulumi.stackname.yaml.example index b4718d34..1276d432 100644 --- a/config/pulumi/Pulumi.stackname.yaml.example +++ b/config/pulumi/Pulumi.stackname.yaml.example @@ -127,7 +127,7 @@ config: # Chart name for the helm chart for kic kic-helm:chart_name: nginx-ingress # Chart version for the helm chart for kic - kic-helm:chart_version: 0.13.2 + kic-helm:chart_version: 0.14.0 # Name of the repo to pull the kic chart from kic-helm:helm_repo_name: nginx-stable # URL of the chart repo to pull kic from @@ -151,12 +151,12 @@ config: # https://docs.nginx.com/nginx-ingress-controller/installation/pulling-ingress-controller-image/ # # The following are all valid image names: - # kic:image_name: private-registry.nginx.com/nginx-ic/nginx-plus-ingress:2.2.2 - # kic:image_name: private-registry.nginx.com/nginx-ic/nginx-plus-ingress:2.2.2-ot - # kic:image_name: docker.io/nginx/nginx-ingress:2.2.2 - # kic:image_name: nginx/nginx-ingress:2.2.2 - # kic:image_name: nginx/nginx-ingress:2.2.2-alpine - kic:image_name: nginx/nginx-ingress:2.2.2 + # kic:image_name: private-registry.nginx.com/nginx-ic/nginx-plus-ingress:2.3.0 + # kic:image_name: private-registry.nginx.com/nginx-ic/nginx-plus-ingress:2.3.0-ot + # kic:image_name: docker.io/nginx/nginx-ingress:2.3.0 + # kic:image_name: nginx/nginx-ingress:2.3.0 + # kic:image_name: nginx/nginx-ingress:2.3.0-alpine + kic:image_name: nginx/nginx-ingress:2.3.0 ############################################################################ @@ -230,7 +230,7 @@ config: # Logagent Configuration logagent:chart_name: filebeat # Chart name for the helm chart for the logagent - logagent:chart_version: 7.16.3 + logagent:chart_version: 7.17.3 # Chart version for the helm chart for the logagent logagent:helm_repo_name: elastic # Name of the repo to pull the logagent from @@ -246,7 +246,7 @@ config: # Logstore Configuration logstore:chart_name: elasticsearch # Chart name for the helm chart for the logstore - logstore:chart_version: 17.6.2 + logstore:chart_version: 19.1.4 # Chart version for the helm chart for the logstore logstore:helm_repo_name: bitnami # Name of the repo to pull the logstore from @@ -277,7 +277,7 @@ config: # Cert Manager Configuration certmgr:chart_name: cert-manager # Chart hame for the helm chart for certmanager - certmgr:chart_version: v1.6.1 + certmgr:chart_version: v1.9.1 # Chart version for the helm chart for certmanager certmgr:certmgr_helm_repo_name: jetstack # Name of the repo to pull the certmanager chart from @@ -293,7 +293,7 @@ config: # Prometheus Configuration prometheus:chart_name: kube-prometheus-stack # Chart name for the helm chart for prometheus - prometheus:chart_version: 30.0.1 + prometheus:chart_version: 39.2.1 # Chart version for the helm chart for prometheus prometheus:helm_repo_name: prometheus-community # Name of the repo to pull the prometheus chart from @@ -301,7 +301,7 @@ config: # URL of the chart repo prometheus:statsd_chart_name: prometheus-statsd-exporter # Name of the statsd chart (uses the same repo as the prom chart) - prometheus.statsd_chart_version: 0.4.2 + prometheus.statsd_chart_version: 0.5.0 # Version of the statsd chart (uses the same repo as the prom chart) prometheus:helm_timeout: 300 # Timeout value for helm operations in seconds @@ -338,7 +338,7 @@ config: # Linode Kubernetes Engine ############################################################################ # This is the Kubernetes version to install using Linode K8s. - linode:k8s_version: 1.22 + linode:k8s_version: 1.23 # This is the default instance type used Linode Kubernetes linode:instance_type: g6-standard-8 # The desired node count of the Linode K8s cluster. From 0ac8f42df2ba02121a8e816b8c4e36d99b35e4d2 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Tue, 2 Aug 2022 09:25:22 -0400 Subject: [PATCH 08/13] fix: remediation of deployment bugs --- pulumi/python/kubernetes/certmgr/__main__.py | 24 ++++---------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/pulumi/python/kubernetes/certmgr/__main__.py b/pulumi/python/kubernetes/certmgr/__main__.py index 992b5ece..49507c84 100644 --- a/pulumi/python/kubernetes/certmgr/__main__.py +++ b/pulumi/python/kubernetes/certmgr/__main__.py @@ -8,12 +8,6 @@ from kic_util import pulumi_config -def crd_deployment_manifest(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - crd_deployment_path = os.path.join(script_dir, 'manifests', 'cert-manager.crds.yaml') - return crd_deployment_path - - def project_name_from_project_dir(dirname: str): script_dir = os.path.dirname(os.path.abspath(__file__)) project_path = os.path.join(script_dir, '..', '..', '..', 'python', 'infrastructure', dirname) @@ -40,17 +34,6 @@ def add_namespace(obj): metadata={'name': 'cert-manager'}, opts=pulumi.ResourceOptions(provider=k8s_provider)) -# Config Manifests -crd_deployment = crd_deployment_manifest() - -crd_dep = ConfigFile( - 'crd-dep', - file=crd_deployment, - transformations=[add_namespace], # Need to review w/ operator - opts=pulumi.ResourceOptions(depends_on=[ns]) -) - - config = pulumi.Config('certmgr') chart_name = config.get('chart_name') if not chart_name: @@ -81,6 +64,9 @@ def add_namespace(obj): ), version=chart_version, namespace=ns.metadata.name, + values={ + "installCRDs": "True" + }, # Configure the timeout value. timeout=helm_timeout, # By default Release resource will wait till all created resources @@ -96,7 +82,7 @@ def add_namespace(obj): # Force update if required force_update=True) -certmgr_release = Release("certmgr", args=certmgr_release_args, opts=pulumi.ResourceOptions(depends_on=crd_dep)) +certmgr_release = Release("certmgr", args=certmgr_release_args, opts=pulumi.ResourceOptions(depends_on=ns)) status = certmgr_release.status -pulumi.export("certmgr_status", status) +pulumi.export("certmgr_status", status) \ No newline at end of file From a66539ef6bb63d61f77150c86c10b8d633f05771 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Wed, 3 Aug 2022 12:10:58 -0400 Subject: [PATCH 09/13] fix: removed JWT-only logic from BoS --- .../applications/sirius/__main__.py | 81 ++++++++++--------- 1 file changed, 43 insertions(+), 38 deletions(-) diff --git a/pulumi/python/kubernetes/applications/sirius/__main__.py b/pulumi/python/kubernetes/applications/sirius/__main__.py index 3d5a3936..fb7c84bb 100644 --- a/pulumi/python/kubernetes/applications/sirius/__main__.py +++ b/pulumi/python/kubernetes/applications/sirius/__main__.py @@ -115,44 +115,49 @@ def add_namespace(obj): # We use the kubernetes namespace for this config = pulumi.Config('kubernetes') infra_type = config.require('infra_type') - -if infra_type == 'AWS': - # Logic to extract the FQDN of the load balancer for Ingress - ingress_project_name = pulumi_ingress_project_name() - ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" - ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) - lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') - sirius_host = lb_ingress_hostname -elif infra_type == 'kubeconfig': - # Logic to extract the FQDN of the load balancer for Ingress - ingress_project_name = pulumi_repo_ingress_project_name() - ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" - ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) - lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') - # Set back to kubernetes - config = pulumi.Config('kubernetes') - lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') - sirius_host = lb_ingress_hostname -elif infra_type == 'DO': - # Logic to extract the FQDN of the load balancer for Ingress - ingress_project_name = pulumi_repo_ingress_project_name() - ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" - ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) - lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') - # Set back to kubernetes - config = pulumi.Config('kubernetes') - lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') - sirius_host = lb_ingress_hostname -elif infra_type == 'LKE': - # Logic to extract the FQDN of the load balancer for Ingress - ingress_project_name = pulumi_repo_ingress_project_name() - ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" - ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) - lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') - # Set back to kubernetes - config = pulumi.Config('kubernetes') - lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') - sirius_host = lb_ingress_hostname +ingress_project_name = pulumi_ingress_project_name() +ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" +ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) +lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') +sirius_host = lb_ingress_hostname + +# if infra_type == 'AWS': +# # Logic to extract the FQDN of the load balancer for Ingress +# ingress_project_name = pulumi_ingress_project_name() +# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" +# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) +# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') +# sirius_host = lb_ingress_hostname +# elif infra_type == 'kubeconfig': +# # Logic to extract the FQDN of the load balancer for Ingress +# ingress_project_name = pulumi_repo_ingress_project_name() +# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" +# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) +# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') +# # Set back to kubernetes +# config = pulumi.Config('kubernetes') +# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') +# sirius_host = lb_ingress_hostname +# elif infra_type == 'DO': +# # Logic to extract the FQDN of the load balancer for Ingress +# ingress_project_name = pulumi_repo_ingress_project_name() +# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" +# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) +# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') +# # Set back to kubernetes +# config = pulumi.Config('kubernetes') +# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') +# sirius_host = lb_ingress_hostname +# elif infra_type == 'LKE': +# # Logic to extract the FQDN of the load balancer for Ingress +# ingress_project_name = pulumi_repo_ingress_project_name() +# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" +# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) +# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') +# # Set back to kubernetes +# config = pulumi.Config('kubernetes') +# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') +# sirius_host = lb_ingress_hostname # Create the namespace for Bank of Sirius From be5ad7ebf0fc82739a97bdced87044b74d0f0ff4 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Wed, 3 Aug 2022 13:06:35 -0400 Subject: [PATCH 10/13] fix: remove logic for sirius_host from deprecated jwt deploys --- .../applications/sirius/__main__.py | 64 +++---------------- 1 file changed, 8 insertions(+), 56 deletions(-) diff --git a/pulumi/python/kubernetes/applications/sirius/__main__.py b/pulumi/python/kubernetes/applications/sirius/__main__.py index fb7c84bb..608a0275 100644 --- a/pulumi/python/kubernetes/applications/sirius/__main__.py +++ b/pulumi/python/kubernetes/applications/sirius/__main__.py @@ -102,64 +102,16 @@ def add_namespace(obj): k8s_provider = k8s.Provider(resource_name=f'ingress-controller', kubeconfig=kubeconfig) -# TODO: Streamline the logic for FQDN/IP into something a bit more sane and scalable #82 # -# Currently, if we are doing an AWS deployment we use the AWS IC deployment, which uses the ELB hostname -# as part of the certificate (self-signed). +# We use the hostanme to set the value for our FQDN, which drives the cert +# process as well. # -# If we are using a kubeconfig file (ie, not type AWS) we expect we are going to get an IP address and not -# a hostname in return. So we use the hostname variable to create the certificate we need, and then we use -# the IP address in output to the user to tell them to setup DNS or a hostfile. -# - -# We use the kubernetes namespace for this -config = pulumi.Config('kubernetes') -infra_type = config.require('infra_type') ingress_project_name = pulumi_ingress_project_name() ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') sirius_host = lb_ingress_hostname -# if infra_type == 'AWS': -# # Logic to extract the FQDN of the load balancer for Ingress -# ingress_project_name = pulumi_ingress_project_name() -# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" -# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) -# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') -# sirius_host = lb_ingress_hostname -# elif infra_type == 'kubeconfig': -# # Logic to extract the FQDN of the load balancer for Ingress -# ingress_project_name = pulumi_repo_ingress_project_name() -# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" -# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) -# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') -# # Set back to kubernetes -# config = pulumi.Config('kubernetes') -# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') -# sirius_host = lb_ingress_hostname -# elif infra_type == 'DO': -# # Logic to extract the FQDN of the load balancer for Ingress -# ingress_project_name = pulumi_repo_ingress_project_name() -# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" -# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) -# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') -# # Set back to kubernetes -# config = pulumi.Config('kubernetes') -# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') -# sirius_host = lb_ingress_hostname -# elif infra_type == 'LKE': -# # Logic to extract the FQDN of the load balancer for Ingress -# ingress_project_name = pulumi_repo_ingress_project_name() -# ingress_stack_ref_id = f"{pulumi_user}/{ingress_project_name}/{stack_name}" -# ingress_stack_ref = pulumi.StackReference(ingress_stack_ref_id) -# lb_ingress_hostname = ingress_stack_ref.get_output('lb_ingress_hostname') -# # Set back to kubernetes -# config = pulumi.Config('kubernetes') -# lb_ingress_ip = ingress_stack_ref.get_output('lb_ingress_ip') -# sirius_host = lb_ingress_hostname - - # Create the namespace for Bank of Sirius ns = k8s.core.v1.Namespace(resource_name='bos', metadata={'name': 'bos'}, @@ -426,12 +378,12 @@ def add_namespace(obj): elif infra_type == 'kubeconfig': pulumi.export('hostname', lb_ingress_hostname) pulumi.export('ipaddress', lb_ingress_ip) - #pulumi.export('application_url', f'https://{lb_ingress_hostname}') + # pulumi.export('application_url', f'https://{lb_ingress_hostname}') application_url = sirius_host.apply(lambda host: f'https://{host}') elif infra_type == 'DO': pulumi.export('hostname', lb_ingress_hostname) pulumi.export('ipaddress', lb_ingress_ip) - #pulumi.export('application_url', f'https://{lb_ingress_hostname}') + # pulumi.export('application_url', f'https://{lb_ingress_hostname}') application_url = sirius_host.apply(lambda host: f'https://{host}') # @@ -462,11 +414,11 @@ def add_namespace(obj): namespace=ns, # Values from Chart's parameters specified hierarchically, - values = { + values={ "serviceMonitor": { "enabled": True, "namespace": "prometheus" - }, + }, "config": { "datasource": { "host": "accounts-db", @@ -509,11 +461,11 @@ def add_namespace(obj): namespace=ns, # Values from Chart's parameters specified hierarchically, - values = { + values={ "serviceMonitor": { "enabled": True, "namespace": "prometheus" - }, + }, "config": { "datasource": { "host": "ledger-db", From b74831b2e65a573f573a61b9efa220f301dd3f09 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Wed, 3 Aug 2022 13:09:22 -0400 Subject: [PATCH 11/13] fix: remove deprecated ingress-repo-only project --- .../applications/sirius/__main__.py | 6 - .../ingress-controller-repo-only/Pulumi.yaml | 7 - .../ingress-controller-repo-only/__main__.py | 189 ------------------ .../manifests/.gitkeep | 0 4 files changed, 202 deletions(-) delete mode 100644 pulumi/python/kubernetes/nginx/ingress-controller-repo-only/Pulumi.yaml delete mode 100644 pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py delete mode 100644 pulumi/python/kubernetes/nginx/ingress-controller-repo-only/manifests/.gitkeep diff --git a/pulumi/python/kubernetes/applications/sirius/__main__.py b/pulumi/python/kubernetes/applications/sirius/__main__.py index 608a0275..ce98d65a 100644 --- a/pulumi/python/kubernetes/applications/sirius/__main__.py +++ b/pulumi/python/kubernetes/applications/sirius/__main__.py @@ -37,12 +37,6 @@ def pulumi_ingress_project_name(): return pulumi_config.get_pulumi_project_name(ingress_project_path) -def pulumi_repo_ingress_project_name(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - ingress_project_path = os.path.join(script_dir, '..', '..', 'nginx', 'ingress-controller-repo-only') - return pulumi_config.get_pulumi_project_name(ingress_project_path) - - def sirius_manifests_location(): script_dir = os.path.dirname(os.path.abspath(__file__)) sirius_manifests_path = os.path.join(script_dir, 'src', 'kubernetes-manifests', '*.yaml') diff --git a/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/Pulumi.yaml b/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/Pulumi.yaml deleted file mode 100644 index 6895e0c4..00000000 --- a/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/Pulumi.yaml +++ /dev/null @@ -1,7 +0,0 @@ -name: ingress-controller -runtime: - name: python - options: - virtualenv: ../../../venv -config: ../../../../../config/pulumi -description: Sets up NGINX Kubernetes Ingress Controller using Helm \ No newline at end of file diff --git a/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py b/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py deleted file mode 100644 index af2e3db8..00000000 --- a/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/__main__.py +++ /dev/null @@ -1,189 +0,0 @@ -import os - -import pulumi -from pulumi import Output -import pulumi_kubernetes as k8s -from pulumi_kubernetes.core.v1 import Service -from pulumi_kubernetes.helm.v3 import Release, ReleaseArgs, RepositoryOptsArgs -from pulumi_kubernetes.yaml import ConfigFile - -from kic_util import pulumi_config - -# -# We default to the OSS IC; if the user wants Plus they need to enable it in the config file -# along with the Plus flag, and the addition of a JWT. -# -config = pulumi.Config('kic-helm') -chart_name = config.get('chart_name') -if not chart_name: - chart_name = 'nginx-ingress' -chart_version = config.get('chart_version') -if not chart_version: - chart_version = '0.13.0' -helm_repo_name = config.get('helm_repo_name') -if not helm_repo_name: - helm_repo_name = 'nginx-stable' -helm_repo_url = config.get('helm_repo_url') -if not helm_repo_url: - helm_repo_url = 'https://helm.nginx.com/stable' -nginx_repository = config.get('nginx_repository') -if not nginx_repository: - nginx_repository = "nginx/nginx-ingress" -nginx_tag = config.get('nginx_tag') -if not nginx_tag: - nginx_tag = "2.2.0" -nginx_plus_flag = config.get_bool('nginx_plus_flag') -if not nginx_plus_flag: - nginx_plus_flag = False - -# -# Allow the user to set timeout per helm chart; otherwise -# we default to 5 minutes. -# -helm_timeout = config.get_int('helm_timeout') -if not helm_timeout: - helm_timeout = 300 - -# Get the FQDN -fqdn = config.get('fqdn') - - -def project_name_from_project_dir(dirname: str): - script_dir = os.path.dirname(os.path.abspath(__file__)) - project_path = os.path.join(script_dir, '..', '..', '..', 'infrastructure', dirname) - return pulumi_config.get_pulumi_project_name(project_path) - - -def k8_manifest_location(): - script_dir = os.path.dirname(os.path.abspath(__file__)) - k8_manifest_path = os.path.join(script_dir, 'manifests', 'regcred.yaml') - return k8_manifest_path - - -k8_manifest = k8_manifest_location() - -registrycred = ConfigFile( - "regcred", - file=k8_manifest) - -chart_values = { - 'controller': { - 'nginxplus': nginx_plus_flag, - 'healthStatus': True, - 'appprotect': { - 'enable': False - }, - "image": { - "repository": nginx_repository, - "tag": nginx_tag, - "pullPolicy": "Always" - }, - "serviceAccount": { - "imagePullSecretName": "regcred" - }, - 'config': { - 'name': 'nginx-config', - 'entries': { - 'log-format': '$remote_addr - $remote_user [$time_local] \"$request\" $status $body_bytes_sent ' - '\"$http_referer\" \"$http_user_agent\" $upstream_response_time $upstream_status ' - '\"$uri\" $request_length $request_time [$proxy_host] [] $upstream_addr ' - '$upstream_bytes_sent $upstream_response_time $upstream_status $request_id ' - } - }, - 'service': { - 'annotations': { - 'co.elastic.logs/module': 'nginx' - }, - "extraLabels": { - "app": "kic-nginx-ingress" - }, - "customPorts": [ - { - "name": "dashboard", - "targetPort": 8080, - "protocol": "TCP", - "port": 8080 - }, - { - "name": "prometheus", - "targetPort": 9113, - "protocol": "TCP", - "port": 9113 - } - ] - }, - 'pod': { - 'annotations': { - 'co.elastic.logs/module': 'nginx' - } - } - }, - 'prometheus': { - 'create': True, - 'port': 9113 - } -} - -stack_name = pulumi.get_stack() -project_name = pulumi.get_project() -pulumi_user = pulumi_config.get_pulumi_user() - -kube_project_name = project_name_from_project_dir('kubeconfig') -kube_stack_ref_id = f"{pulumi_user}/{kube_project_name}/{stack_name}" -kube_stack_ref = pulumi.StackReference(kube_stack_ref_id) -kubeconfig = kube_stack_ref.require_output('kubeconfig').apply(lambda c: str(c)) - -k8s_provider = k8s.Provider(resource_name=f'ingress-controller-repo-only', - kubeconfig=kubeconfig) - -# This is required for the service monitor from the Prometheus namespace -ns = k8s.core.v1.Namespace(resource_name='nginx-ingress', - metadata={'name': 'nginx-ingress', - 'labels': { - 'prometheus': 'scrape'} - }, - opts=pulumi.ResourceOptions(provider=k8s_provider)) - -kic_release_args = ReleaseArgs( - chart=chart_name, - repository_opts=RepositoryOptsArgs( - repo=helm_repo_url - ), - version=chart_version, - namespace=ns.metadata.name, - - # Values from Chart's parameters specified hierarchically, - values=chart_values, - # User configurable timeout - timeout=helm_timeout, - # By default Release resource will wait till all created resources - # are available. Set this to true to skip waiting on resources being - # available. - skip_await=False, - # If we fail, clean up - cleanup_on_fail=True, - # Provide a name for our release - name="kic", - # Lint the chart before installing - lint=True, - # Force update if required - force_update=True) - -kic_chart = Release("kic", args=kic_release_args, opts=pulumi.ResourceOptions(depends_on=[ns])) - -pstatus = kic_chart.status - -srv = Service.get("nginx-ingress", - Output.concat("nginx-ingress", "/", pstatus.name, "-nginx-ingress")) - -ingress_service = srv.status - -# -# Some LB's give us a hostname (which is cool) and some just an IP. We need to capture -# both, and then make a determination on what the user needs to do based on what they have -# been given. -# -pulumi.export('lb_ingress_hostname', fqdn) -pulumi.export('lb_ingress_ip', pulumi.Output.unsecret(ingress_service.load_balancer.ingress[0].ip)) -# Print out our status -pulumi.export("kic_status", pstatus) diff --git a/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/manifests/.gitkeep b/pulumi/python/kubernetes/nginx/ingress-controller-repo-only/manifests/.gitkeep deleted file mode 100644 index e69de29b..00000000 From 58020d4f1177266d15e1333bb16414f235f3e253 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Wed, 3 Aug 2022 14:08:19 -0400 Subject: [PATCH 12/13] fix: adjust min kubectl version deployed --- bin/setup_venv.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/setup_venv.sh b/bin/setup_venv.sh index 845f70dc..e1ab75eb 100755 --- a/bin/setup_venv.sh +++ b/bin/setup_venv.sh @@ -258,7 +258,7 @@ fi # downloading the kubectl if it did not exist; this could result in versions not being updated if the # MARA project was run in the same environment w/o a refresh. # -# The two fixes here are to hardcode (For now) to a known good version (1.23.6) and force the script to +# The two fixes here are to hardcode (For now) to a known good version (1.24.3) and force the script to # always download this version. # # TODO: Figure out a way to not hardcode the kubectl version @@ -275,7 +275,7 @@ if [ ! -x "${VIRTUAL_ENV}/bin/kubectl" ]; then else echo "kubectl is already installed, but will overwrite to ensure correct version" echo "Downloading kubectl into virtual environment" - KUBECTL_VERSION="v1.23.6" + KUBECTL_VERSION="v1.24.3" ${download_cmd} "https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/${OS}/${ARCH}/kubectl" >"${VIRTUAL_ENV}/bin/kubectl" KUBECTL_CHECKSUM="$(${download_cmd} "https://dl.k8s.io/${KUBECTL_VERSION}/bin/${OS}/${ARCH}/kubectl.sha256")" echo "${KUBECTL_CHECKSUM} ${VIRTUAL_ENV}/bin/kubectl" | ${sha256sum_cmd} @@ -316,4 +316,4 @@ if [ ! -x "${VIRTUAL_ENV}/bin/doctl" ]; then tar --extract --gunzip --directory "${VIRTUAL_ENV}/bin" --file "${DOCTL_TARBALL_DEST}" [ $? -eq 0 ] && echo "Digital Ocean CLI installed successfully" || echo "Failed to install Digital Ocean CLI" rm "${DOCTL_TARBALL_DEST}" -fi \ No newline at end of file +fi From 83ecfea90c9c8e2ef9e5e65ff766e873e9633ec6 Mon Sep 17 00:00:00 2001 From: Jason Schmidt Date: Thu, 4 Aug 2022 17:57:40 -0400 Subject: [PATCH 13/13] fix: refactor digitalocean to docean for variables --- config/pulumi/Pulumi.stackname.yaml.example | 8 ++-- pulumi/python/automation/providers/do.py | 38 +++++++++---------- .../container-registry/__main__.py | 2 +- .../digitalocean/dns-record/__main__.py | 9 ++++- .../digitalocean/domk8s/__main__.py | 8 ++-- .../applications/sirius/__main__.py | 21 +++------- 6 files changed, 40 insertions(+), 46 deletions(-) diff --git a/config/pulumi/Pulumi.stackname.yaml.example b/config/pulumi/Pulumi.stackname.yaml.example index 1276d432..d261d750 100644 --- a/config/pulumi/Pulumi.stackname.yaml.example +++ b/config/pulumi/Pulumi.stackname.yaml.example @@ -324,13 +324,13 @@ config: # Digital Ocean Managed Kubernetes and Container Registry ############################################################################ # This is the Kubernetes version to install using Digital Ocean K8s. - digitalocean:k8s_version: 1.22.8-do.1 + docean:k8s_version: 1.22.12-do.0 # This is the default instance type used by Digital Ocean K8s. - digitalocean:instance_size: s-2vcpu-4gb + docean:instance_size: s-4vcpu-8gb # The desired node count of the Digital Ocean K8s cluster. - digitalocean:node_count: 3 + docean:node_count: 3 # The region to deploy the cluster - digitalocean:region: sfo3 + docean:region: sfo3 # Subscription tier for container registry digitalocean:container_registry_subscription_tier: starter diff --git a/pulumi/python/automation/providers/do.py b/pulumi/python/automation/providers/do.py index f77441ec..0de22746 100644 --- a/pulumi/python/automation/providers/do.py +++ b/pulumi/python/automation/providers/do.py @@ -113,7 +113,7 @@ def new_stack_config(self, env_config, defaults: Union[Dict[Hashable, Any], list config = super().new_stack_config(env_config, defaults) if 'DIGITALOCEAN_TOKEN' not in env_config: - config['digitalocean:token'] = input("Digital Ocean API token (this is stored in plain-text - " + config['docean:token'] = input("Digital Ocean API token (this is stored in plain-text - " "alternatively this can be specified as the environment variable " "DIGITALOCEAN_TOKEN): ") @@ -131,42 +131,42 @@ def new_stack_config(self, env_config, defaults: Union[Dict[Hashable, Any], list print('Supported Kubernetes versions:') for slug in k8s_version_slugs: print(f' {slug}') - default_version = defaults['digitalocean:k8s_version'] or k8s_version_slugs[0] - config['digitalocean:k8s_version'] = input(f'Kubernetes version [{default_version}]: ').strip() or default_version - print(f"Kubernetes version: {config['digitalocean:k8s_version']}") + default_version = defaults['docean:k8s_version'] or k8s_version_slugs[0] + config['docean:k8s_version'] = input(f'Kubernetes version [{default_version}]: ').strip() or default_version + print(f"Kubernetes version: {config['docean:k8s_version']}") # Kubernetes regions k8s_regions_json_str, _ = external_process.run(do_cli.get_kubernetes_regions_json()) k8s_regions_json = json.loads(k8s_regions_json_str) - default_region = defaults['digitalocean:region'] or k8s_regions_json[-1]['slug'] + default_region = defaults['docean:region'] or k8s_regions_json[-1]['slug'] print('Supported Regions:') for item in k8s_regions_json: print(f" {item['name']}: {item['slug']}") - config['digitalocean:region'] = input(f'Region [{default_region}]: ').strip() or default_region - print(f"Region: {config['digitalocean:region']}") + config['docean:region'] = input(f'Region [{default_region}]: ').strip() or default_region + print(f"Region: {config['docean:region']}") # Kubernetes instance size k8s_sizes_json_str, _ = external_process.run(do_cli.get_kubernetes_instance_sizes_json()) k8s_sizes_json = json.loads(k8s_sizes_json_str) k8s_sizes_slugs = [size['slug'] for size in k8s_sizes_json] - default_size = defaults['digitalocean:instance_size'] or 's-2vcpu-4gb' + default_size = defaults['docean:instance_size'] or 's-2vcpu-4gb' print('Supported Instance Sizes:') for slug in k8s_sizes_slugs: print(f' {slug}') - config['digitalocean:instance_size'] = input(f'Instance size [{default_size}]: ').strip() or default_size - print(f"Instance size: {config['digitalocean:instance_size']}") + config['docean:instance_size'] = input(f'Instance size [{default_size}]: ').strip() or default_size + print(f"Instance size: {config['docean:instance_size']}") # Kubernetes instance count - default_node_count = defaults['digitalocean:node_count'] or 3 - while 'digitalocean:node_count' not in config: + default_node_count = defaults['docean:node_count'] or 3 + while 'docean:node_count' not in config: node_count = input('Node count for Kubernetes cluster ' f'[{default_node_count}]: ').strip() or default_node_count if type(node_count) == int or node_count.isdigit(): - config['digitalocean:node_count'] = int(node_count) - print(f"Node count: {config['digitalocean:node_count']}") + config['docean:node_count'] = int(node_count) + print(f"Node count: {config['docean:node_count']}") return config @@ -217,16 +217,16 @@ def token(stack_config: Union[Mapping[str, Any], MutableMapping[str, auto._confi return env_config['DIGITALOCEAN_TOKEN'] # We were given a reference to a StackConfigParser object - if 'config' in stack_config and 'digitalocean:token' in stack_config['config']: - return stack_config['config']['digitalocean:token'] + if 'config' in stack_config and 'docean:token' in stack_config['config']: + return stack_config['config']['docean:token'] # We were given a reference to a Pulumi Stack configuration - if 'digitalocean:token' in stack_config: - return stack_config['digitalocean:token'].value + if 'docean:token' in stack_config: + return stack_config['docean:token'].value # Otherwise msg = 'When using the Digital Ocean provider, an API token must be specified - ' \ - 'this token can be specified with the Pulumi config parameter digitalocean:token ' \ + 'this token can be specified with the Pulumi config parameter docean:token ' \ 'or the environment variable DIGITALOCEAN_TOKEN' raise InvalidConfigurationException(msg) diff --git a/pulumi/python/infrastructure/digitalocean/container-registry/__main__.py b/pulumi/python/infrastructure/digitalocean/container-registry/__main__.py index 20cb64bb..f326c632 100644 --- a/pulumi/python/infrastructure/digitalocean/container-registry/__main__.py +++ b/pulumi/python/infrastructure/digitalocean/container-registry/__main__.py @@ -5,7 +5,7 @@ from kic_util import external_process -config = pulumi.Config('digitalocean') +config = pulumi.Config('docean') # valid values: starter, basic, professional subscription_tier = config.get('container_registry_subscription_tier') if not subscription_tier: diff --git a/pulumi/python/infrastructure/digitalocean/dns-record/__main__.py b/pulumi/python/infrastructure/digitalocean/dns-record/__main__.py index 3b428e14..9c826190 100644 --- a/pulumi/python/infrastructure/digitalocean/dns-record/__main__.py +++ b/pulumi/python/infrastructure/digitalocean/dns-record/__main__.py @@ -28,9 +28,14 @@ def extract_ip_address(lb_ingress): config = pulumi.Config('kic-helm') fqdn = config.require('fqdn') -ingress_domain = docean.Domain.get(resource_name='ingress-domain', id=fqdn, name=fqdn) +# +# Split our hostname off the domain name to build the DNS records +# +hostname, domainname = fqdn.split('.',1) + +ingress_domain = docean.Domain.get(resource_name='ingress-domain', id=domainname, name=domainname) ingress_a_record = docean.DnsRecord(resource_name='ingress-a-record', - name='@', + name=hostname, domain=ingress_domain.id, type="A", ttl=1800, diff --git a/pulumi/python/infrastructure/digitalocean/domk8s/__main__.py b/pulumi/python/infrastructure/digitalocean/domk8s/__main__.py index f94a37f3..c82a734d 100644 --- a/pulumi/python/infrastructure/digitalocean/domk8s/__main__.py +++ b/pulumi/python/infrastructure/digitalocean/domk8s/__main__.py @@ -5,14 +5,14 @@ from kic_util import pulumi_config # Configuration details for the K8 cluster -config = pulumi.Config('digitalocean') +config = pulumi.Config('docean') instance_size = config.get('instance_size') if not instance_size: - instance_size = 's-2vcpu-4gb' + instance_size = 's-4vcpu-8gb' region = config.get('region') if not region: region = 'sfo3' -node_count = config.get('node_count') +node_count = config.get_int('node_count') if not node_count: node_count = 3 k8s_version = config.get('k8s_version') @@ -41,7 +41,7 @@ def container_registry_project_name(): node_pool=KubernetesClusterNodePoolArgs( name=pool_name, size=instance_size, - node_count=node_count, + node_count=node_count )) kubeconfig = cluster.kube_configs[0].raw_config diff --git a/pulumi/python/kubernetes/applications/sirius/__main__.py b/pulumi/python/kubernetes/applications/sirius/__main__.py index ce98d65a..88aa12e9 100644 --- a/pulumi/python/kubernetes/applications/sirius/__main__.py +++ b/pulumi/python/kubernetes/applications/sirius/__main__.py @@ -363,22 +363,11 @@ def add_namespace(obj): )], )) -# We use the kubernetes namespace for this -config = pulumi.Config('kubernetes') -infra_type = config.require('infra_type') -if infra_type == 'AWS': - application_url = sirius_host.apply(lambda host: f'https://{host}') - pulumi.export('application_url', application_url) -elif infra_type == 'kubeconfig': - pulumi.export('hostname', lb_ingress_hostname) - pulumi.export('ipaddress', lb_ingress_ip) - # pulumi.export('application_url', f'https://{lb_ingress_hostname}') - application_url = sirius_host.apply(lambda host: f'https://{host}') -elif infra_type == 'DO': - pulumi.export('hostname', lb_ingress_hostname) - pulumi.export('ipaddress', lb_ingress_ip) - # pulumi.export('application_url', f'https://{lb_ingress_hostname}') - application_url = sirius_host.apply(lambda host: f'https://{host}') +# +# Get the hostname for our connect URL +# +application_url = sirius_host.apply(lambda host: f'https://{host}') +pulumi.export('application_url', application_url) # # Get the chart values for both monitoring charts, switch back to the Sirius