def app_spec_no_ports(app_spec): exec_check = CheckSpec(http=None, tcp=None, execute=ExecCheckSpec(command="/app/check.sh"), initial_delay_seconds=10, period_seconds=10, success_threshold=1, failure_threshold=3, timeout_seconds=1) return app_spec._replace(ports=[], health_checks=HealthCheckSpec(liveness=exec_check, readiness=exec_check), ingresses=[])
def app_spec(self, request, app_spec): generic_toggle, deploy_labels, deploy_annotations, pod_labels, pod_annotations, singleton = request.param labels = LabelAndAnnotationSpec(deployment=deploy_labels, horizontal_pod_autoscaler={}, ingress={}, service={}, pod=pod_labels, status={}) annotations = LabelAndAnnotationSpec(deployment=deploy_annotations, horizontal_pod_autoscaler={}, ingress={}, service={}, pod=pod_annotations, status={}) if generic_toggle: ports = app_spec.ports health_checks = app_spec.health_checks replicas = 1 else: ports = [] exec_check = CheckSpec(http=None, tcp=None, execute=ExecCheckSpec(command="/app/check.sh"), initial_delay_seconds=10, period_seconds=10, success_threshold=1, failure_threshold=3, timeout_seconds=1) health_checks = HealthCheckSpec(liveness=exec_check, readiness=exec_check) replicas = 5 yield app_spec._replace( admin_access=generic_toggle, ports=ports, health_checks=health_checks, labels=labels, annotations=annotations, replicas=replicas, singleton=singleton, )