Skip to content

Commit cfd83e3

Browse files
authored
preserving fields only when using k8s specs (zalando#1228)
* preserving fields when k8s specs are used with x-kubernetes-preserve-unknown-fields flag * cleaning up merge errors in postgresql and operatorconfiguration CRD * add operatorconfiguration CRD and sample manifests in setUpClass of e2e tests * update generated code and go modules
1 parent c4ae116 commit cfd83e3

File tree

11 files changed

+253
-828
lines changed

11 files changed

+253
-828
lines changed

charts/postgres-operator/crds/operatorconfigurations.yaml

+18-171
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ spec:
4747
schema:
4848
openAPIV3Schema:
4949
type: object
50-
x-preserve-unknown-fields: true
5150
required:
5251
- kind
5352
- apiVersion
@@ -97,7 +96,7 @@ spec:
9796
nullable: true
9897
items:
9998
type: object
100-
additionalProperties: true
99+
x-kubernetes-preserve-unknown-fields: true
101100
workers:
102101
type: integer
103102
minimum: 1
@@ -275,6 +274,11 @@ spec:
275274
type: boolean
276275
enable_replica_load_balancer:
277276
type: boolean
277+
external_traffic_policy:
278+
type: string
279+
enum:
280+
- "Cluster"
281+
- "Local"
278282
master_dns_name_format:
279283
type: string
280284
replica_dns_name_format:
@@ -330,6 +334,10 @@ spec:
330334
properties:
331335
enable_admin_role_for_users:
332336
type: boolean
337+
enable_postgres_team_crd:
338+
type: boolean
339+
enable_postgres_team_crd_superusers:
340+
type: boolean
333341
enable_team_superuser:
334342
type: boolean
335343
enable_teams_api:
@@ -342,176 +350,15 @@ spec:
342350
type: array
343351
items:
344352
type: string
345-
pod_service_account_name:
346-
type: string
347-
pod_terminate_grace_period:
348-
type: string
349-
secret_name_template:
350-
type: string
351-
spilo_fsgroup:
352-
type: integer
353-
spilo_privileged:
354-
type: boolean
355-
toleration:
356-
type: object
357-
additionalProperties:
358-
type: string
359-
watched_namespace:
360-
type: string
361-
postgres_pod_resources:
362-
type: object
363-
properties:
364-
default_cpu_limit:
365-
type: string
366-
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
367-
default_cpu_request:
368-
type: string
369-
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
370-
default_memory_limit:
371-
type: string
372-
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
373-
default_memory_request:
374-
type: string
375-
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
376-
timeouts:
377-
type: object
378-
properties:
379-
pod_label_wait_timeout:
380-
type: string
381-
pod_deletion_wait_timeout:
382-
type: string
383-
ready_wait_interval:
384-
type: string
385-
ready_wait_timeout:
386-
type: string
387-
resource_check_interval:
388-
type: string
389-
resource_check_timeout:
390-
type: string
391-
load_balancer:
392-
type: object
393-
properties:
394-
custom_service_annotations:
395-
type: object
396-
additionalProperties:
397-
type: string
398-
db_hosted_zone:
399-
type: string
400-
enable_master_load_balancer:
401-
type: boolean
402-
enable_replica_load_balancer:
403-
type: boolean
404-
external_traffic_policy:
405-
type: string
406-
enum:
407-
- "Cluster"
408-
- "Local"
409-
master_dns_name_format:
410-
type: string
411-
replica_dns_name_format:
412-
type: string
413-
aws_or_gcp:
414-
type: object
415-
properties:
416-
additional_secret_mount:
417-
type: string
418-
additional_secret_mount_path:
419-
type: string
420-
aws_region:
421-
type: string
422-
kube_iam_role:
423-
type: string
424-
log_s3_bucket:
425-
type: string
426-
wal_s3_bucket:
427-
type: string
428-
logical_backup:
429-
type: object
430-
properties:
431-
logical_backup_schedule:
432-
type: string
433-
pattern: '^(\d+|\*)(/\d+)?(\s+(\d+|\*)(/\d+)?){4}$'
434-
logical_backup_docker_image:
435-
type: string
436-
logical_backup_s3_bucket:
437-
type: string
438-
logical_backup_s3_endpoint:
439-
type: string
440-
logical_backup_s3_sse:
441-
type: string
442-
logical_backup_s3_access_key_id:
443-
type: string
444-
logical_backup_s3_secret_access_key:
445-
type: string
446-
debug:
447-
type: object
448-
properties:
449-
debug_logging:
450-
type: boolean
451-
enable_database_access:
452-
type: boolean
453-
teams_api:
454-
type: object
455-
properties:
456-
enable_admin_role_for_users:
457-
type: boolean
458-
enable_postgres_team_crd:
459-
type: boolean
460-
enable_postgres_team_crd_superusers:
461-
type: boolean
462-
enable_team_superuser:
463-
type: boolean
464-
enable_teams_api:
465-
type: boolean
466-
pam_configuration:
467-
type: string
468-
pam_role_name:
469-
type: string
470-
postgres_superuser_teams:
471-
type: array
472-
items:
473-
type: string
474-
protected_role_names:
475-
type: array
476-
items:
477-
type: string
478-
team_admin_role:
479-
type: string
480-
team_api_role_configuration:
481-
type: object
482-
additionalProperties:
483-
type: string
484-
teams_api_url:
485-
type: string
486-
logging_rest_api:
487-
type: object
488-
properties:
489-
api_port:
490-
type: integer
491-
cluster_history_entries:
492-
type: integer
493-
ring_log_lines:
494-
type: integer
495-
scalyr:
496-
type: object
497-
properties:
498-
scalyr_api_key:
499-
type: string
500-
scalyr_cpu_limit:
501-
type: string
502-
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
503-
scalyr_cpu_request:
504-
type: string
505-
pattern: '^(\d+m|\d+(\.\d{1,3})?)$'
506-
scalyr_image:
507-
type: string
508-
scalyr_memory_limit:
509-
type: string
510-
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
511-
scalyr_memory_request:
353+
protected_role_names:
354+
type: array
355+
items:
512356
type: string
513-
pattern: '^(\d+(e\d+)?|\d+(\.\d+)?(e\d+)?[EPTGMK]i?)$'
514-
scalyr_server_url:
357+
team_admin_role:
358+
type: string
359+
team_api_role_configuration:
360+
type: object
361+
additionalProperties:
515362
type: string
516363
teams_api_url:
517364
type: string

0 commit comments

Comments
 (0)