Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a schema for the ProwJob crd #19522

Merged
merged 18 commits into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config/prow/cluster/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ release(
component("prow-canary-k8s-io", "managedcertificate"),
component("prow-k8s-io", "managedcertificate"),
component("prow-kubernetes-io", "managedcertificate"),
component("prowjob", "customresourcedefinition"),
component(
"prowjob",
"customresourcedefinition",
args = ["--server-side=true"],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: we're just speculating that this will work, but not sure. might suggest move this change to a separate PR just in case revert is needed we don't need to revert this large PR

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, not doing this will definitely not work as the PR changes the CRD file 😬

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, finger crossed then

),
component("pushgateway", "deployment"),
component("sinker", "service", "deployment", "rbac"),
component("statusreconciler", "deployment", "rbac"),
Expand Down
1 change: 1 addition & 0 deletions config/prow/cluster/crier_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ spec:
ports:
- name: metrics
port: 9090
protocol: TCP
selector:
app: crier
2 changes: 2 additions & 0 deletions config/prow/cluster/deck_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ spec:
- name: main
port: 80
targetPort: 8080
protocol: TCP
- name: metrics
port: 9090
protocol: TCP
type: NodePort
2 changes: 2 additions & 0 deletions config/prow/cluster/hook_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ spec:
ports:
- name: main
port: 8888
protocol: TCP
- name: metrics
port: 9090
protocol: TCP
type: NodePort
1 change: 1 addition & 0 deletions config/prow/cluster/horologium_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ spec:
ports:
- name: metrics
port: 9090
protocol: TCP
selector:
app: horologium
1 change: 1 addition & 0 deletions config/prow/cluster/prow_controller_manager_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,6 @@ spec:
ports:
- name: metrics
port: 9090
protocol: TCP
selector:
app: prow-controller-manager
20,130 changes: 20,066 additions & 64 deletions config/prow/cluster/prowjob_customresourcedefinition.yaml

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: prowjobs.prow.k8s.io
annotations:
"api-approved.kubernetes.io": "https://github.com/kubernetes/test-infra/pull/8669"
spec:
group: prow.k8s.io
names:
kind: ProwJob
singular: prowjob
plural: prowjobs
scope: Namespaced
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
max_concurrency:
type: integer
minimum: 0
type:
type: string
enum:
- "presubmit"
- "postsubmit"
- "periodic"
- "batch"
status:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
state:
type: string
enum:
- "triggered"
- "pending"
- "success"
- "failure"
- "aborted"
- "error"
anyOf:
- not:
properties:
state:
enum:
- "success"
- "failure"
- "error"
- required:
- completionTime
additionalPrinterColumns:
- name: Job
type: string
description: The name of the job being run.
jsonPath: .spec.job
- name: BuildId
type: string
description: The ID of the job being run.
jsonPath: .status.build_id
- name: Type
type: string
description: The type of job being run.
jsonPath: .spec.type
- name: Org
type: string
description: The org for which the job is running.
jsonPath: .spec.refs.org
- name: Repo
type: string
description: The repo for which the job is running.
jsonPath: .spec.refs.repo
- name: Pulls
type: string
description: The pulls for which the job is running.
jsonPath: ".spec.refs.pulls[*].number"
- name: StartTime
type: date
description: When the job started running.
jsonPath: .status.startTime
- name: CompletionTime
type: date
description: When the job finished running.
jsonPath: .status.completionTime
- name: State
description: The state of the job.
type: string
jsonPath: .status.state
96 changes: 0 additions & 96 deletions config/prow/cluster/starter-gcs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,102 +127,6 @@ data:
- image: alpine
command: ["/bin/date"]
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: prowjobs.prow.k8s.io
annotations:
"api-approved.kubernetes.io": "https://github.com/kubernetes/test-infra/pull/8669"
spec:
group: prow.k8s.io
names:
kind: ProwJob
singular: prowjob
plural: prowjobs
scope: Namespaced
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
max_concurrency:
type: integer
minimum: 0
type:
type: string
enum:
- "presubmit"
- "postsubmit"
- "periodic"
- "batch"
status:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
state:
type: string
enum:
- "triggered"
- "pending"
- "success"
- "failure"
- "aborted"
- "error"
anyOf:
- not:
properties:
state:
enum:
- "success"
- "failure"
- "error"
- required:
- completionTime
additionalPrinterColumns:
- name: Job
type: string
description: The name of the job being run.
jsonPath: .spec.job
- name: BuildId
type: string
description: The ID of the job being run.
jsonPath: .status.build_id
- name: Type
type: string
description: The type of job being run.
jsonPath: .spec.type
- name: Org
type: string
description: The org for which the job is running.
jsonPath: .spec.refs.org
- name: Repo
type: string
description: The repo for which the job is running.
jsonPath: .spec.refs.repo
- name: Pulls
type: string
description: The pulls for which the job is running.
jsonPath: ".spec.refs.pulls[*].number"
- name: StartTime
type: date
description: When the job started running.
jsonPath: .status.startTime
- name: CompletionTime
type: date
description: When the job finished running.
jsonPath: .status.completionTime
- name: State
description: The state of the job.
type: string
jsonPath: .status.state
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
96 changes: 0 additions & 96 deletions config/prow/cluster/starter-s3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -127,102 +127,6 @@ data:
- image: alpine
command: ["/bin/date"]
---
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
name: prowjobs.prow.k8s.io
annotations:
"api-approved.kubernetes.io": "https://github.com/kubernetes/test-infra/pull/8669"
spec:
group: prow.k8s.io
names:
kind: ProwJob
singular: prowjob
plural: prowjobs
scope: Namespaced
versions:
- name: v1
served: true
storage: true
schema:
openAPIV3Schema:
type: object
properties:
spec:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
max_concurrency:
type: integer
minimum: 0
type:
type: string
enum:
- "presubmit"
- "postsubmit"
- "periodic"
- "batch"
status:
type: object
x-kubernetes-preserve-unknown-fields: true
properties:
state:
type: string
enum:
- "triggered"
- "pending"
- "success"
- "failure"
- "aborted"
- "error"
anyOf:
- not:
properties:
state:
enum:
- "success"
- "failure"
- "error"
- required:
- completionTime
additionalPrinterColumns:
- name: Job
type: string
description: The name of the job being run.
jsonPath: .spec.job
- name: BuildId
type: string
description: The ID of the job being run.
jsonPath: .status.build_id
- name: Type
type: string
description: The type of job being run.
jsonPath: .spec.type
- name: Org
type: string
description: The org for which the job is running.
jsonPath: .spec.refs.org
- name: Repo
type: string
description: The repo for which the job is running.
jsonPath: .spec.refs.repo
- name: Pulls
type: string
description: The pulls for which the job is running.
jsonPath: ".spec.refs.pulls[*].number"
- name: StartTime
type: date
description: When the job started running.
jsonPath: .status.startTime
- name: CompletionTime
type: date
description: When the job finished running.
jsonPath: .status.completionTime
- name: State
description: The state of the job.
type: string
jsonPath: .status.state
---
apiVersion: apps/v1
kind: Deployment
metadata:
Expand Down
2 changes: 2 additions & 0 deletions config/prow/cluster/tide_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ spec:
- name: main
port: 80
targetPort: 8888
protocol: TCP
- name: metrics
port: 9090
protocol: TCP
type: ClusterIP
Loading