sigs.k8s.io/kubebuilder/v3@v3.14.0/hack/docs/internal/cronjob-tutorial/sample.go (about) 1 /* 2 Copyright 2023 The Kubernetes Authors. 3 4 Licensed under the Apache License, Version 2.0 (the "License"); 5 you may not use this file except in compliance with the License. 6 You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10 Unless required by applicable law or agreed to in writing, software 11 distributed under the License is distributed on an "AS IS" BASIS, 12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 See the License for the specific language governing permissions and 14 limitations under the License. 15 */ 16 17 package cronjob 18 19 const CronjobSample = ` 20 schedule: "*/1 * * * *" 21 startingDeadlineSeconds: 60 22 concurrencyPolicy: Allow # explicitly specify, but Allow is also default. 23 jobTemplate: 24 spec: 25 template: 26 spec: 27 containers: 28 - name: hello 29 image: busybox 30 args: 31 - /bin/sh 32 - -c 33 - date; echo Hello from the Kubernetes cluster 34 restartPolicy: OnFailure` 35 36 const DefaultKustomization = `#replacements: 37 # - source: # Add cert-manager annotation to ValidatingWebhookConfiguration, MutatingWebhookConfiguration and CRDs 38 # kind: Certificate 39 # group: cert-manager.io 40 # version: v1 41 # name: serving-cert # this name should match the one in certificate.yaml 42 # fieldPath: .metadata.namespace # namespace of the certificate CR 43 # targets: 44 # - select: 45 # kind: ValidatingWebhookConfiguration 46 # fieldPaths: 47 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 48 # options: 49 # delimiter: '/' 50 # index: 0 51 # create: true 52 # - select: 53 # kind: MutatingWebhookConfiguration 54 # fieldPaths: 55 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 56 # options: 57 # delimiter: '/' 58 # index: 0 59 # create: true 60 # - select: 61 # kind: CustomResourceDefinition 62 # fieldPaths: 63 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 64 # options: 65 # delimiter: '/' 66 # index: 0 67 # create: true 68 # - source: 69 # kind: Certificate 70 # group: cert-manager.io 71 # version: v1 72 # name: serving-cert # this name should match the one in certificate.yaml 73 # fieldPath: .metadata.name 74 # targets: 75 # - select: 76 # kind: ValidatingWebhookConfiguration 77 # fieldPaths: 78 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 79 # options: 80 # delimiter: '/' 81 # index: 1 82 # create: true 83 # - select: 84 # kind: MutatingWebhookConfiguration 85 # fieldPaths: 86 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 87 # options: 88 # delimiter: '/' 89 # index: 1 90 # create: true 91 # - select: 92 # kind: CustomResourceDefinition 93 # fieldPaths: 94 # - .metadata.annotations.[cert-manager.io/inject-ca-from] 95 # options: 96 # delimiter: '/' 97 # index: 1 98 # create: true 99 # - source: # Add cert-manager annotation to the webhook Service 100 # kind: Service 101 # version: v1 102 # name: webhook-service 103 # fieldPath: .metadata.name # namespace of the service 104 # targets: 105 # - select: 106 # kind: Certificate 107 # group: cert-manager.io 108 # version: v1 109 # fieldPaths: 110 # - .spec.dnsNames.0 111 # - .spec.dnsNames.1 112 # options: 113 # delimiter: '.' 114 # index: 0 115 # create: true 116 # - source: 117 # kind: Service 118 # version: v1 119 # name: webhook-service 120 # fieldPath: .metadata.namespace # namespace of the service 121 # targets: 122 # - select: 123 # kind: Certificate 124 # group: cert-manager.io 125 # version: v1 126 # fieldPaths: 127 # - .spec.dnsNames.0 128 # - .spec.dnsNames.1 129 # options: 130 # delimiter: '.' 131 # index: 1 132 # create: true` 133 134 const ManagerAuthProxySample = ` 135 affinity: 136 nodeAffinity: 137 requiredDuringSchedulingIgnoredDuringExecution: 138 nodeSelectorTerms: 139 - matchExpressions: 140 - key: kubernetes.io/arch 141 operator: In 142 values: 143 - amd64 144 - arm64 145 - ppc64le 146 - s390x 147 - key: kubernetes.io/os 148 operator: In 149 values: 150 - linux`