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

fix: Invalid OpenAPI Spec due to IntOrString. Fixes #4817 #4831

Merged
merged 1 commit into from
Feb 15, 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
5 changes: 1 addition & 4 deletions api/jsonschema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -8636,10 +8636,7 @@
"type": "string"
},
"io.k8s.apimachinery.pkg.util.intstr.IntOrString": {
"type": [
"string",
"integer"
]
"type": "string"
},
"sensor.CreateSensorRequest": {
"properties": {
Expand Down
5 changes: 1 addition & 4 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -12044,10 +12044,7 @@
"format": "date-time"
},
"io.k8s.apimachinery.pkg.util.intstr.IntOrString": {
"type": [
"string",
"integer"
]
"type": "string"
},
"sensor.CreateSensorRequest": {
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion examples/daemon-nginx.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
readinessProbe:
httpGet:
path: /
port: 80
port: "80"
initialDelaySeconds: 2
timeoutSeconds: 1

Expand Down
2 changes: 1 addition & 1 deletion examples/daemon-step.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ spec:
readinessProbe:
httpGet:
path: /ping
port: 8086
port: "8086"
initialDelaySeconds: 5
timeoutSeconds: 1

Expand Down
2 changes: 1 addition & 1 deletion examples/dag-daemon-task.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
readinessProbe:
httpGet:
path: /ping
port: 8086
port: "8086"
initialDelaySeconds: 5
timeoutSeconds: 1

Expand Down
6 changes: 3 additions & 3 deletions examples/dag-disable-failFast.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ spec:
args: ["hello world"]
- name: b
retryStrategy:
limit: 2
limit: "2"
container:
image: alpine:latest
command: [sh, -c]
args: ["sleep 30; echo haha"]
- name: c
retryStrategy:
limit: 3
limit: "3"
container:
image: alpine:latest
command: [sh, -c]
Expand All @@ -46,4 +46,4 @@ spec:
template: d
- name: E
dependencies: [D]
template: d
template: d
2 changes: 1 addition & 1 deletion examples/default-pdb-support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ spec:
entrypoint: pdbcreate
serviceAccountName: default
podDisruptionBudget:
minAvailable: 9999 # Provide arbitrary big number if you don't know how many pods workflow creates
minAvailable: "9999" # Provide arbitrary big number if you don't know how many pods workflow creates
templates:
- name: pdbcreate
container:
Expand Down
2 changes: 1 addition & 1 deletion examples/influxdb-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ spec:
readinessProbe:
httpGet:
path: /ping
port: 8086
port: "8086"
initialDelaySeconds: 5
timeoutSeconds: 1
command: ["/bin/sh", "-c"]
Expand Down
4 changes: 2 additions & 2 deletions examples/retry-backoff.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ spec:
templates:
- name: retry-backoff
retryStrategy:
limit: 10
limit: "10"
backoff:
duration: "1" # Must be a string. Default unit is seconds. Could also be a Duration, e.g.: "2m", "6h", "1d"
factor: 2
factor: "2"
maxDuration: "1m" # Must be a string. Default unit is seconds. Could also be a Duration, e.g.: "2m", "6h", "1d"
container:
image: python:alpine3.6
Expand Down
2 changes: 1 addition & 1 deletion examples/retry-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
templates:
- name: retry-container
retryStrategy:
limit: 10
limit: "10"
container:
image: python:alpine3.6
command: ["python", -c]
Expand Down
2 changes: 1 addition & 1 deletion examples/retry-on-error.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
templates:
- name: error-container
retryStrategy:
limit: 2
limit: "2"
retryPolicy: "Always" # Retry on errors AND failures. Also available: "OnFailure" (default), "OnError"
container:
image: python
Expand Down
2 changes: 1 addition & 1 deletion examples/retry-script.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
templates:
- name: retry-script
retryStrategy:
limit: 10
limit: "10"
script:
image: python:alpine3.6
command: ["python"]
Expand Down
2 changes: 1 addition & 1 deletion examples/retry-with-steps.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ spec:
template: random-fail
- name: random-fail
retryStrategy:
limit: 10
limit: "10"
container:
image: python:alpine3.6
command: [python, -c]
Expand Down
2 changes: 1 addition & 1 deletion hack/swagger/kubeifyswagger.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ func kubeifySwagger(in, out string) {
}
}

definitions["io.k8s.apimachinery.pkg.util.intstr.IntOrString"] = obj{"type": array{"string", "integer"}}
definitions["io.k8s.apimachinery.pkg.util.intstr.IntOrString"] = obj{"type": "string"}
// "omitempty" does not work for non-nil structs, so we must change it here
definitions["io.argoproj.workflow.v1alpha1.CronWorkflow"].(obj)["required"] = array{"metadata", "spec"}
definitions["io.argoproj.workflow.v1alpha1.Workflow"].(obj)["required"] = array{"metadata", "spec"}
Expand Down