k8s.io/test-infra@v0.0.0-20240520184403-27c6b4c223d8/config/prow/cluster/build/boskos.yaml (about) 1 # Copyright 2017 The Kubernetes Authors. 2 # 3 # Licensed under the Apache License, Version 2.0 (the "License"); 4 # you may not use this file except in compliance with the License. 5 # You may obtain a copy of the License at 6 # 7 # http://www.apache.org/licenses/LICENSE-2.0 8 # 9 # Unless required by applicable law or agreed to in writing, software 10 # distributed under the License is distributed on an "AS IS" BASIS, 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 # See the License for the specific language governing permissions and 13 # limitations under the License. 14 15 apiVersion: apiextensions.k8s.io/v1 16 kind: CustomResourceDefinition 17 metadata: 18 name: dynamicresourcelifecycles.boskos.k8s.io 19 annotations: 20 api-approved.kubernetes.io: https://github.com/kubernetes-sigs/boskos/pull/105 21 spec: 22 group: boskos.k8s.io 23 names: 24 kind: DRLCObject 25 listKind: DRLCObjectList 26 plural: dynamicresourcelifecycles 27 singular: dynamicresourcelifecycle 28 scope: Namespaced 29 versions: 30 - name: v1 31 served: true 32 storage: true 33 additionalPrinterColumns: 34 - name: Type 35 type: string 36 description: The dynamic resource type. 37 jsonPath: .spec.config.type 38 - name: Min-Count 39 type: integer 40 description: The minimum count requested. 41 jsonPath: .spec.min-count 42 - name: Max-Count 43 type: integer 44 description: The maximum count requested. 45 jsonPath: .spec.max-count 46 schema: 47 openAPIV3Schema: 48 description: Defines the lifecycle of a dynamic resource. All 49 Resource of a given type will be constructed using the same 50 configuration 51 type: object 52 properties: 53 spec: 54 type: object 55 properties: 56 state: 57 type: string 58 max-count: 59 description: Maxiumum number of resources expected. This 60 maximum may be temporarily exceeded while resources are in 61 the process of being deleted, though this is only expected 62 when MaxCount is lowered. 63 type: integer 64 format: int32 65 min-count: 66 description: Minimum number of resources to be used as a 67 buffer. Resources in the process of being deleted and 68 cleaned up are included in this count. 69 type: integer 70 format: int32 71 lifespan: 72 description: Lifespan of a resource, time after which the 73 resource should be reset 74 type: integer 75 format: int64 76 config: 77 description: Config information about how to create the 78 object 79 type: object 80 properties: 81 type: 82 description: The dynamic resource type 83 type: string 84 content: 85 type: string 86 needs: 87 description: Define the resource needs to create the object 88 type: object 89 x-kubernetes-preserve-unknown-fields: true 90 --- 91 apiVersion: apiextensions.k8s.io/v1 92 kind: CustomResourceDefinition 93 metadata: 94 name: resources.boskos.k8s.io 95 annotations: 96 api-approved.kubernetes.io: https://github.com/kubernetes-sigs/boskos/pull/105 97 spec: 98 group: boskos.k8s.io 99 names: 100 kind: ResourceObject 101 listKind: ResourceObjectList 102 plural: resources 103 singular: resource 104 scope: Namespaced 105 versions: 106 - name: v1 107 served: true 108 storage: true 109 additionalPrinterColumns: 110 - name: Type 111 type: string 112 description: The resource type. 113 jsonPath: .spec.type 114 - name: State 115 type: string 116 description: The current state of the resource. 117 jsonPath: .status.state 118 - name: Owner 119 type: string 120 description: The current owner of the resource. 121 jsonPath: .status.owner 122 - name: Last-Updated 123 type: date 124 jsonPath: .status.lastUpdate 125 schema: 126 openAPIV3Schema: 127 description: Abstracts any resource type that can be tracked by boskos 128 type: object 129 properties: 130 spec: 131 description: Holds information that are not likely to change 132 type: object 133 properties: 134 type: 135 type: string 136 status: 137 description: Holds information that are likely to change 138 type: object 139 properties: 140 state: 141 type: string 142 owner: 143 type: string 144 lastUpdate: 145 type: string 146 format: date-time 147 userData: 148 type: object 149 x-kubernetes-preserve-unknown-fields: true 150 expirationDate: 151 type: string 152 format: date-time 153 --- 154 kind: ClusterRole 155 apiVersion: rbac.authorization.k8s.io/v1 156 metadata: 157 name: boskos 158 rules: 159 - apiGroups: ["boskos.k8s.io"] 160 verbs: ["*"] 161 resources: ["*"] 162 --- 163 kind: ServiceAccount 164 apiVersion: v1 165 metadata: 166 name: boskos 167 namespace: test-pods 168 --- 169 kind: ClusterRoleBinding 170 apiVersion: rbac.authorization.k8s.io/v1 171 metadata: 172 name: boskos 173 subjects: 174 - kind: ServiceAccount 175 name: boskos 176 namespace: test-pods 177 roleRef: 178 kind: ClusterRole 179 name: boskos 180 apiGroup: rbac.authorization.k8s.io 181 --- 182 apiVersion: apps/v1 183 kind: Deployment 184 metadata: 185 name: boskos 186 namespace: test-pods 187 spec: 188 replicas: 1 # one canonical source of resources 189 selector: 190 matchLabels: 191 app: boskos 192 template: 193 metadata: 194 labels: 195 app: boskos 196 namespace: test-pods 197 spec: 198 serviceAccountName: boskos 199 terminationGracePeriodSeconds: 30 200 containers: 201 - name: boskos 202 image: gcr.io/k8s-staging-boskos/boskos:v20240416-59dbd6c 203 args: 204 - --config=/etc/config/config 205 - --namespace=test-pods 206 ports: 207 - containerPort: 8080 208 protocol: TCP 209 volumeMounts: 210 - name: boskos-config 211 mountPath: /etc/config 212 readOnly: true 213 volumes: 214 - name: boskos-config 215 configMap: 216 name: resources 217 --- 218 apiVersion: v1 219 kind: Service 220 metadata: 221 name: boskos 222 namespace: test-pods 223 spec: 224 selector: 225 app: boskos 226 ports: 227 - name: default 228 protocol: TCP 229 port: 80 230 targetPort: 8080 231 --- 232 apiVersion: v1 233 kind: Service 234 metadata: 235 name: boskos-metrics 236 namespace: test-pods 237 spec: 238 selector: 239 app: boskos 240 ports: 241 - name: metrics 242 port: 9090 243 protocol: TCP 244 targetPort: 9090 245 loadBalancerIP: 104.197.27.114 # external ip boskos-metrics 246 type: LoadBalancer