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

template out validations on old OCP 3.x releases #328

Merged
merged 1 commit into from
May 5, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions roles/migrationcontroller/templates/velero_supporting.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ spec:
singular: backup
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we be comparing the major version too? This will break with kubernetes 2.0

validation:
openAPIV3Schema:
description: Backup is a Velero resource that respresents the capture of Kubernetes
Expand Down Expand Up @@ -382,6 +383,7 @@ spec:
type: integer
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -410,6 +412,7 @@ spec:
singular: schedule
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: Schedule is a Velero resource that represents a pre-scheduled or
Expand Down Expand Up @@ -756,6 +759,7 @@ spec:
type: array
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -784,6 +788,7 @@ spec:
singular: restore
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: Restore is a Velero resource that represents the application of
Expand Down Expand Up @@ -1030,6 +1035,7 @@ spec:
type: integer
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1058,6 +1064,7 @@ spec:
singular: downloadrequest
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: DownloadRequest is a request to download an artifact from backup
Expand Down Expand Up @@ -1123,6 +1130,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1151,6 +1159,7 @@ spec:
singular: deletebackuprequest
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: DeleteBackupRequest is a request to delete one or more backups.
Expand Down Expand Up @@ -1195,6 +1204,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1223,6 +1233,7 @@ spec:
singular: podvolumebackup
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
properties:
Expand Down Expand Up @@ -1356,6 +1367,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1384,6 +1396,7 @@ spec:
singular: podvolumerestore
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
properties:
Expand Down Expand Up @@ -1515,6 +1528,7 @@ spec:
type: integer
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1543,6 +1557,7 @@ spec:
singular: resticrepository
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
properties:
Expand Down Expand Up @@ -1603,6 +1618,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1631,6 +1647,7 @@ spec:
singular: backupstoragelocation
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: BackupStorageLocation is a location where Velero stores backup
Expand Down Expand Up @@ -1723,6 +1740,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1751,6 +1769,7 @@ spec:
singular: volumesnapshotlocation
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: VolumeSnapshotLocation is a location where Velero stores volume
Expand Down Expand Up @@ -1796,6 +1815,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down Expand Up @@ -1824,6 +1844,7 @@ spec:
singular: serverstatusrequest
preserveUnknownFields: false
scope: Namespaced
{% if lookup('k8s', cluster_info='version').kubernetes.minor|replace('+', '')|int < 11 %}
validation:
openAPIV3Schema:
description: ServerStatusRequest is a request to access current status information
Expand Down Expand Up @@ -1880,6 +1901,7 @@ spec:
type: string
type: object
type: object
{% endif %}
version: v1
versions:
- name: v1
Expand Down