├── .gitignore ├── .travis.yml ├── README.md ├── behat.yml.dist ├── bin └── test.sh ├── composer.json ├── features ├── bootstrap │ ├── ClientContext.php │ ├── CronJobContext.php │ ├── JobContext.php │ ├── NamespaceContext.php │ ├── PersistentVolumeContext.php │ ├── PodContext.php │ ├── SecretContext.php │ └── ServiceContext.php ├── cronJob.feature ├── deployments.feature ├── jobs.feature ├── namespaces.feature ├── persistent-volumes.feature ├── pods.feature ├── secrets.feature └── services.feature ├── integration-tests ├── tests │ └── GuzzleHttpClientTest.php └── webserver │ └── index.php ├── phpspec.yml ├── phpunit.xml ├── spec ├── Adapter │ └── Http │ │ ├── AuthenticationMiddlewareSpec.php │ │ ├── FileHttpClientSpec.php │ │ ├── GuzzleHttpClientSpec.php │ │ ├── HttpNamespaceClientSpec.php │ │ └── Repository │ │ ├── HttpDeploymentRepositorySpec.php │ │ └── HttpReplicationControllerRepositorySpec.php └── ClientSpec.php ├── src ├── Adapter │ ├── AdapterInterface.php │ ├── Http │ │ ├── AuthenticationMiddleware.php │ │ ├── GuzzleHttpClient.php │ │ ├── HttpAdapter.php │ │ ├── HttpClient.php │ │ ├── HttpConnector.php │ │ ├── HttpNamespaceClient.php │ │ ├── HttpPodStatusProvider.php │ │ └── Repository │ │ │ ├── HttpCronJobRepository.php │ │ │ ├── HttpDeploymentRepository.php │ │ │ ├── HttpEventRepository.php │ │ │ ├── HttpIngressRepository.php │ │ │ ├── HttpJobRepository.php │ │ │ ├── HttpNamespaceRepository.php │ │ │ ├── HttpNetworkPolicyRepository.php │ │ │ ├── HttpNodeRepository.php │ │ │ ├── HttpPersistentVolumeClaimRepository.php │ │ │ ├── HttpPodRepository.php │ │ │ ├── HttpReplicationControllerRepository.php │ │ │ ├── HttpSecretRepository.php │ │ │ ├── HttpServiceAccountRepository.php │ │ │ ├── HttpServiceRepository.php │ │ │ └── RBAC │ │ │ └── HttpRoleBindingRepository.php │ └── React │ │ └── PodOutputStream.php ├── Client.php ├── Exception │ ├── ClientError.php │ ├── ConnectorException.php │ ├── CronJobNotFound.php │ ├── DeploymentNotFound.php │ ├── Exception.php │ ├── IngressNotFound.php │ ├── JobNotFound.php │ ├── NamespaceNotFound.php │ ├── NotAuthorizedException.php │ ├── ObjectNotFound.php │ ├── PersistentVolumeClaimNotFound.php │ ├── PodNotFound.php │ ├── ReplicationControllerNotFound.php │ ├── SecretNotFound.php │ ├── ServerError.php │ ├── ServiceAccountNotFound.php │ ├── ServiceNotFound.php │ └── TooManyObjects.php ├── Model │ ├── Annotation.php │ ├── Container.php │ ├── ContainerPort.php │ ├── ContainerStatus.php │ ├── ContainerStatusState.php │ ├── ContainerStatusStateRunning.php │ ├── ContainerStatusStateTerminated.php │ ├── ContainerStatusStateWaiting.php │ ├── CronJob.php │ ├── CronJobList.php │ ├── CronJobSpecification.php │ ├── CronJobStatus.php │ ├── Deployment.php │ ├── Deployment │ │ ├── DeploymentRollback.php │ │ ├── DeploymentStrategy.php │ │ ├── RollbackConfiguration.php │ │ └── RollingUpdateDeployment.php │ ├── DeploymentList.php │ ├── DeploymentSpecification.php │ ├── DeploymentStatus.php │ ├── EnvironmentVariable.php │ ├── Event.php │ ├── EventList.php │ ├── EventSource.php │ ├── ExecAction.php │ ├── HttpGetAction.php │ ├── IPBlock.php │ ├── Ingress.php │ ├── IngressBackend.php │ ├── IngressHttpRule.php │ ├── IngressHttpRulePath.php │ ├── IngressList.php │ ├── IngressRule.php │ ├── IngressSpecification.php │ ├── IngressStatus.php │ ├── IngressTls.php │ ├── Job.php │ ├── JobList.php │ ├── JobSelector.php │ ├── JobSelectorRequirement.php │ ├── JobSpecification.php │ ├── JobStatus.php │ ├── JobStatusCondition.php │ ├── JobTemplateSpecification.php │ ├── KeyValueObject.php │ ├── KeyValueObjectList.php │ ├── KubernetesNamespace.php │ ├── KubernetesObject.php │ ├── Label.php │ ├── LabelSelector.php │ ├── LoadBalancerIngress.php │ ├── LoadBalancerStatus.php │ ├── LocalObjectReference.php │ ├── NamespaceList.php │ ├── NamespaceStatus.php │ ├── NetworkPolicy │ │ ├── NetworkPolicy.php │ │ ├── NetworkPolicyEgressRule.php │ │ ├── NetworkPolicyIngressRule.php │ │ ├── NetworkPolicyList.php │ │ ├── NetworkPolicyPeer.php │ │ ├── NetworkPolicyPort.php │ │ └── NetworkPolicySpec.php │ ├── Node.php │ ├── NodeAddress.php │ ├── NodeCondition.php │ ├── NodeList.php │ ├── NodeSpecification.php │ ├── NodeStatus.php │ ├── NodeSystemInfo.php │ ├── ObjectMetadata.php │ ├── ObjectReference.php │ ├── PersistentVolumeClaim.php │ ├── PersistentVolumeClaimSpecification.php │ ├── PersistentVolumeClaimStatus.php │ ├── Pod.php │ ├── PodList.php │ ├── PodSelector.php │ ├── PodSelectorRequirement.php │ ├── PodSpecification.php │ ├── PodStatus.php │ ├── PodStatusCondition.php │ ├── PodStatusProvider.php │ ├── PodTemplateSpecification.php │ ├── Probe.php │ ├── RBAC │ │ ├── ClusterRole.php │ │ ├── ClusterRoleBinding.php │ │ ├── PolicyRule.php │ │ ├── Role.php │ │ ├── RoleBinding.php │ │ ├── RoleRef.php │ │ └── Subject.php │ ├── ReplicationController.php │ ├── ReplicationControllerList.php │ ├── ReplicationControllerSpecification.php │ ├── ResourceLimits.php │ ├── ResourceRequirements.php │ ├── ResourceRequirementsRequests.php │ ├── Secret.php │ ├── SecurityContext.php │ ├── Service.php │ ├── ServiceAccount.php │ ├── ServiceList.php │ ├── ServicePort.php │ ├── ServiceSpecification.php │ ├── ServiceStatus.php │ ├── Status.php │ ├── TcpSocketAction.php │ ├── Volume.php │ ├── Volume │ │ ├── EmptyDirVolumeSource.php │ │ ├── HostPathVolumeSource.php │ │ ├── NfsVolumeSource.php │ │ └── PersistentVolumeClaimSource.php │ └── VolumeMount.php ├── NamespaceClient.php ├── Repository │ ├── CronJobRepository.php │ ├── DeploymentRepository.php │ ├── EventRepository.php │ ├── IngressRepository.php │ ├── JobRepository.php │ ├── NamespaceRepository.php │ ├── NetworkPolicyRepository.php │ ├── NodeRepository.php │ ├── ObjectRepository.php │ ├── PersistentVolumeClaimRepository.php │ ├── PodRepository.php │ ├── RBAC │ │ └── RoleBindingRepository.php │ ├── ReplicationControllerRepository.php │ ├── SecretRepository.php │ ├── ServiceAccountRepository.php │ ├── ServiceRepository.php │ └── WrappedObjectRepository.php ├── Resources │ └── serializer │ │ ├── Model.Container.yml │ │ ├── Model.ContainerPort.yml │ │ ├── Model.ContainerStatus.yml │ │ ├── Model.ContainerStatusState.yml │ │ ├── Model.ContainerStatusStateRunning.yml │ │ ├── Model.ContainerStatusStateTerminated.yml │ │ ├── Model.ContainerStatusStateWaiting.yml │ │ ├── Model.CronJob.yml │ │ ├── Model.CronJobSpecification.yml │ │ ├── Model.CronJobStatus.yml │ │ ├── Model.Deployment.DeploymentStrategy.yml │ │ ├── Model.Deployment.RollbackConfiguration.yml │ │ ├── Model.Deployment.RollingUpdateDeployment.yml │ │ ├── Model.Deployment.yml │ │ ├── Model.DeploymentList.yml │ │ ├── Model.DeploymentSpecification.yml │ │ ├── Model.DeploymentStatus.yml │ │ ├── Model.EnvironmentVariable.yml │ │ ├── Model.Event.yml │ │ ├── Model.EventList.yml │ │ ├── Model.EventSource.yml │ │ ├── Model.ExecAction.yml │ │ ├── Model.HttpGetAction.yml │ │ ├── Model.IPBlock.yml │ │ ├── Model.Ingress.yml │ │ ├── Model.IngressBackend.yml │ │ ├── Model.IngressHttpRule.yml │ │ ├── Model.IngressHttpRulePath.yml │ │ ├── Model.IngressList.yml │ │ ├── Model.IngressRule.yml │ │ ├── Model.IngressSpecification.yml │ │ ├── Model.IngressStatus.yml │ │ ├── Model.IngressTls.yml │ │ ├── Model.Job.yml │ │ ├── Model.JobList.yml │ │ ├── Model.JobSelector.yml │ │ ├── Model.JobSelectorRequirement.yml │ │ ├── Model.JobSpecification.yml │ │ ├── Model.JobStatus.yml │ │ ├── Model.JobStatusCondition.yml │ │ ├── Model.JobTemplateSpecification.yml │ │ ├── Model.KubernetesNamespace.yml │ │ ├── Model.LabelSelector.yml │ │ ├── Model.LoadBalancerIngress.yml │ │ ├── Model.LoadBalancerStatus.yml │ │ ├── Model.LocalObjectReference.yml │ │ ├── Model.NamespaceList.yml │ │ ├── Model.NamespaceStatus.yml │ │ ├── Model.NetworkPolicy.NetworkPolicy.yml │ │ ├── Model.NetworkPolicy.NetworkPolicyEgressRule.yml │ │ ├── Model.NetworkPolicy.NetworkPolicyIngressRule.yml │ │ ├── Model.NetworkPolicy.NetworkPolicyList.yml │ │ ├── Model.NetworkPolicy.NetworkPolicyPeer.yml │ │ ├── Model.NetworkPolicy.NetworkPolicyPort.yml │ │ ├── Model.NetworkPolicy.NetworkPolicySpec.yml │ │ ├── Model.Node.yml │ │ ├── Model.NodeAddress.yml │ │ ├── Model.NodeCondition.yml │ │ ├── Model.NodeList.yml │ │ ├── Model.NodeSpecification.yml │ │ ├── Model.NodeStatus.yml │ │ ├── Model.NodeSystemInfo.yml │ │ ├── Model.ObjectMetadata.yml │ │ ├── Model.ObjectReference.yml │ │ ├── Model.PersistentVolumeClaim.yml │ │ ├── Model.PersistentVolumeClaimSpecification.yml │ │ ├── Model.PersistentVolumeClaimStatus.yml │ │ ├── Model.Pod.yml │ │ ├── Model.PodList.yml │ │ ├── Model.PodMetadata.yml │ │ ├── Model.PodSelector.yml │ │ ├── Model.PodSelectorRequirement.yml │ │ ├── Model.PodSpecification.yml │ │ ├── Model.PodStatus.yml │ │ ├── Model.PodStatusCondition.yml │ │ ├── Model.PodTemplateSpecification.yml │ │ ├── Model.Probe.yml │ │ ├── Model.RBAC.ClusterRole.yml │ │ ├── Model.RBAC.ClusterRoleBinding.yml │ │ ├── Model.RBAC.PolicyRule.yml │ │ ├── Model.RBAC.Role.yml │ │ ├── Model.RBAC.RoleBinding.yml │ │ ├── Model.RBAC.RoleRef.yml │ │ ├── Model.RBAC.Subject.yml │ │ ├── Model.ReplicationController.yml │ │ ├── Model.ReplicationControllerList.yml │ │ ├── Model.ReplicationControllerSpecification.yml │ │ ├── Model.ResourceLimits.yml │ │ ├── Model.ResourceRequirements.yml │ │ ├── Model.ResourceRequirementsRequests.yml │ │ ├── Model.Secret.yml │ │ ├── Model.SecurityContext.yml │ │ ├── Model.Service.yml │ │ ├── Model.ServiceAccount.yml │ │ ├── Model.ServiceList.yml │ │ ├── Model.ServicePort.yml │ │ ├── Model.ServiceSpecification.yml │ │ ├── Model.ServiceStatus.yml │ │ ├── Model.Status.yml │ │ ├── Model.TcpSocketAction.yml │ │ ├── Model.Volume.EmptyDirVolumeSource.yml │ │ ├── Model.Volume.HostPathVolumeSource.yml │ │ ├── Model.Volume.NfsVolumeSource.yml │ │ ├── Model.Volume.PersistentVolumeClaimSource.yml │ │ ├── Model.Volume.yml │ │ └── Model.VolumeMount.yml ├── Serializer │ ├── JmsSerializerAdapter.php │ └── JmsSerializerRollingUpdateDeploymentHandler.php ├── functions.php └── functions_include.php └── tests └── Adapter └── Http ├── FileHttpClient.php ├── FileResolver.php ├── HttpRecorderClientDecorator.php ├── SerializationTest.php └── fixtures ├── .gitkeep ├── delete__apis_batch_v1_namespaces_pods-heaven_jobs_env-test-37a6259cc0c1dae299a7866489dff0bd ├── delete__apis_batch_v1_namespaces_pods-heaven_jobs_my-job-37a6259cc0c1dae299a7866489dff0bd ├── delete__apis_batch_v1beta_namespaces_pods-heaven_cronjobs_my-cron-job-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_foo-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_foo_services_plop-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_my-bar-namespace-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_my-baz-namespace-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_pods-heaven-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_pods-heaven_pods_env-test-37a6259cc0c1dae299a7866489dff0bd ├── delete__namespaces_pods-heaven_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd ├── get__apis_batch_v1_namespaces_pods-heaven_jobs_args-37a6259cc0c1dae299a7866489dff0bd ├── get__apis_batch_v1_namespaces_pods-heaven_jobs_commanded-37a6259cc0c1dae299a7866489dff0bd ├── get__apis_batch_v1_namespaces_pods-heaven_jobs_env-test-37a6259cc0c1dae299a7866489dff0bd ├── get__apis_batch_v1_namespaces_pods-heaven_jobs_my-job-37a6259cc0c1dae299a7866489dff0bd ├── get__apis_batch_v1beta_namespaces_pods-heaven_cronjobs_my-cron-job-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo_persistentvolumeclaims_my-claim-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo_pods_mounted-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo_secrets_dockercfg-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_foo_services_plop-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_labelSelector_bar_3Dbar-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_labelSelector_bar_3Dbaz-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_pods-heaven-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_pods-heaven_pods_commanded-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_pods-heaven_pods_commanded_log-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_pods-heaven_pods_env-test-37a6259cc0c1dae299a7866489dff0bd ├── get__namespaces_pods-heaven_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-370d445de76290e995de530ead39ca8f ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-3e7bfe0b27962853868390ff50d74980 ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-40988a4dc2a3954cab4782aa0537a39d ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-7dd59d04f4e6435b990d397db16d5b66 ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-9f4479f45904cce45fab9e01395f4db3 ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-bcd08f9ea1ed23a953f53a1bcd750ebf ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-c7a836bfa955182a7722d28d508ef8bb ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-c97b72917d6c5848c268efd4fc4c46d4 ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-d13a4d6e97097266841c7c1e324c71db ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-f0ab2724202c792d83b80364cea9cefc ├── post__apis_batch_v1_namespaces_pods-heaven_jobs-fe54ddd552a5584a22de345030fb00ae ├── post__apis_batch_v1beta_namespaces_pods-heaven_cronjobs-654977d63f8af947861fbedd7cdcc5d7 ├── post__namespaces-0de5a63a3863d11ba04ce429dffb7ede ├── post__namespaces-1190f25acf79c7136f97861869558da2 ├── post__namespaces-2fdc588f73ab5c5ecdac8410564d8f03 ├── post__namespaces-d69a632a83d6460668c7c1bbe12ac20a ├── post__namespaces_foo_persistentvolumeclaims-0cbe63132082ff8da27d3574a6e98c42 ├── post__namespaces_foo_persistentvolumeclaims-e238d65c5700858db20f2298bded9f37 ├── post__namespaces_foo_pods-550af21a6847f7d8343268e52d5f2d69 ├── post__namespaces_foo_pods-c4d76287d80bf59bf20e1f393a2a4d41 ├── post__namespaces_foo_secrets-139e2563c0e1fc9a6b8646396d17820b ├── post__namespaces_foo_services-aa6f72f87fa51a7578a2f059cee09047 ├── post__namespaces_foo_services-e9632726705c33941384874f3936719f ├── post__namespaces_pods-heaven_pods-5a951a46513ff53762d84c0be35fc7a9 ├── post__namespaces_pods-heaven_pods-83e76354fe2b7b2d6f4232bbc47e48d3 ├── post__namespaces_pods-heaven_pods-cc27df5be77cbefdbe2608a387f4ba58 ├── post__namespaces_pods-heaven_pods-cd14804fd1c2b609ee50d2cebf2b6ba9 ├── post__namespaces_pods-heaven_pods-d83c48e407a658c2717269235f203fa1 └── post__namespaces_pods-heaven_pods-e70a698b5e57e13e058c16c175cdbc9f /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /composer.lock 3 | /bin/behat 4 | /bin/phpspec 5 | /bin/phpunit 6 | /behat.yml 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | matrix: 4 | include: 5 | - php: 7.0 6 | - php: 7.1 7 | 8 | sudo: false 9 | 10 | cache: 11 | directories: 12 | - $HOME/.composer/cache 13 | 14 | before_install: 15 | - composer self-update 16 | 17 | before_script: 18 | - travis_retry composer install --no-interaction 19 | 20 | script: 21 | - bin/test.sh 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Kubernetes client 2 | 3 | [![Build Status](https://travis-ci.org/sroze/kubernetes-client.svg?branch=master)](https://travis-ci.org/sroze/kubernetes-client) 4 | 5 | A library that provide a client for the Kubernetes API client. 6 | 7 | ## Getting started 8 | 9 | To create an anonymous client, you can: 10 | 11 | ```php 12 | $httpClient = new GuzzleHttpClient( 13 | new Client(), 14 | 'baseUrl', 15 | 'version' 16 | ); 17 | 18 | $client = new Client( 19 | new HttpAdapter($httpClient, new Serializer()) 20 | ); 21 | ``` 22 | 23 | To had user authentication, you can decorate the http client: 24 | ```php 25 | $authenticatedHttpClient = new AuthenticationMiddleware( 26 | $httpClient, 27 | AuthenticationMiddleware::USERNAME_PASSWORD, 28 | 'username:password' 29 | ); 30 | ``` 31 | 32 | ## Serializer 33 | 34 | If you use JMS serializer, the serializer adapter already exists in the `src/Serializer` directory. 35 | There is also an handler for the `RollingUpdateDeployment` object type used by Kubernetes that uses 36 | `integerOrString` types. 37 | 38 | ## Development 39 | 40 | Install application dependencies: 41 | 42 | ``` 43 | composer install 44 | ``` 45 | 46 | ## Tests 47 | 48 | Tests are specifications written with [PhpSpec](http://github.com/phpspec/phpspec). 49 | 50 | ``` 51 | ./bin/phpspec run 52 | ``` 53 | -------------------------------------------------------------------------------- /behat.yml.dist: -------------------------------------------------------------------------------- 1 | default: 2 | suites: 3 | application: 4 | contexts: 5 | - ClientContext: 6 | - https://baseUrl # Base server URL 7 | - v1 # API version 8 | - username # Username or Token 9 | - password # Password 10 | - false # Integration tests? 11 | - false # Record the requests for HTTP fixtures? 12 | - NamespaceContext 13 | - SecretContext 14 | - ServiceContext 15 | - JobContext 16 | - CronJobContext 17 | - PodContext 18 | - PersistentVolumeContext 19 | 20 | gherkin: 21 | filters: 22 | tags: "~@wip" 23 | -------------------------------------------------------------------------------- /bin/test.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | clear; 4 | 5 | # PHPSpec tests 6 | ./bin/phpspec run --no-interaction; 7 | PHPSPEC_RETURN_CODE=$? 8 | 9 | # Behat tests 10 | ./bin/behat; 11 | BEHAT_RETURN_CODE=$? 12 | 13 | # Start webserver, run PHPUnit integration tests, stop webserver 14 | php -S localhost:8089 integration-tests/webserver/index.php &> /dev/null & 15 | WEBSERVER_PROCESS_ID=$!; 16 | ./bin/phpunit; 17 | PHPUNIT_RETURN_CODE=$? 18 | kill -9 $WEBSERVER_PROCESS_ID; 19 | 20 | # Print results so you don't have to scroll 21 | echo; 22 | echo "PHPSpec return code: $PHPSPEC_RETURN_CODE"; 23 | echo "Behat return code: $BEHAT_RETURN_CODE"; 24 | echo "PHPUnit return code: $PHPUNIT_RETURN_CODE"; 25 | echo; 26 | 27 | # Work out an exit code, and exit 28 | OVERALL_EXIT_CODE=$((PHPSPEC_RETURN_CODE + BEHAT_RETURN_CODE + PHPUNIT_RETURN_CODE)) 29 | exit $OVERALL_EXIT_CODE; -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sroze/kubernetes-client", 3 | "autoload": { 4 | "files": ["src/functions_include.php"], 5 | "psr-4": { 6 | "Kubernetes\\Client\\": "src/" 7 | } 8 | }, 9 | "autoload-dev": { 10 | "psr-4": { 11 | "Kubernetes\\Client\\": "tests/" 12 | } 13 | }, 14 | "require": { 15 | "guzzlehttp/guzzle": "^6.2", 16 | "symfony/serializer": "^2.7|^3.0", 17 | "jms/serializer": "^1.0.0", 18 | "react/stream": "~0.7.4", 19 | "psr/log": "^1.0" 20 | }, 21 | "require-dev": { 22 | "phpspec/phpspec": "~4.0", 23 | "behat/behat": "^3.0", 24 | "phpunit/phpunit": "^5.6", 25 | "symfony/http-foundation": "^3.2", 26 | "bossa/phpspec2-expect": "^3.0" 27 | }, 28 | "config": { 29 | "bin-dir": "bin" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /features/cronJob.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to have running containers 3 | As a developer 4 | I want to be able to manage cron jobs 5 | 6 | Background: 7 | Given I have a namespace "pods-heaven" 8 | And the namespace "pods-heaven" is ready 9 | 10 | @deleteCronJob 11 | Scenario: I can create a cron job 12 | When I create a cron job "my-cron-job" with schedule "@hourly" 13 | Then the cron job "my-cron-job" should exists 14 | And the cron job "my-cron-job" should be scheduled "@hourly" 15 | -------------------------------------------------------------------------------- /features/deployments.feature: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sroze/kubernetes-client/4280b483786e8199a0174a58c9eee00776009166/features/deployments.feature -------------------------------------------------------------------------------- /features/namespaces.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to create isolated environments 3 | I want to manage the Kubernetes namespaces 4 | 5 | Scenario: Create a namespace 6 | When I send a request creation for the namespace "foo" 7 | Then the namespace "foo" should exists 8 | 9 | Scenario: List a namespace 10 | Given I have a namespace "foo" 11 | When I get the list of namespaces 12 | Then the namespace "foo" should be in the list 13 | 14 | Scenario: Delete a namespace 15 | Given I have a namespace "foo" 16 | When I delete the namespace "foo" 17 | Then the namespace "foo" should not exists or be terminating 18 | 19 | @cleanNamespace 20 | Scenario: List namespace with matching label 21 | Given I have a namespace "my-bar-namespace" with the labels "bar=baz" 22 | When I get the list of namespaces matching the labels "bar=baz" 23 | Then the namespace "my-bar-namespace" should be in the list 24 | 25 | @cleanNamespace 26 | Scenario: List namespace with non-matching label 27 | Given I have a namespace "my-baz-namespace" with the labels "bar=baz" 28 | When I get the list of namespaces matching the labels "bar=bar" 29 | Then the namespace "my-baz-namespace" should not be in the list 30 | -------------------------------------------------------------------------------- /features/persistent-volumes.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to request persistent storage 3 | I need to be able to manage persistent volumes and volume claims 4 | 5 | Background: 6 | Given I have a namespace "foo" 7 | 8 | Scenario: I can create a volume claim 9 | When I created a persistent volume claim 10 | Then the persistent volume claim should exists 11 | 12 | @cleanNamespace 13 | Scenario: I can mount a persistent volume from its claim 14 | Given I have a persistent volume claim "foo" 15 | When I create a pod "mounted" with the volume claim "foo" mounted at "/foo" 16 | Then the pod "mounted" should exists 17 | -------------------------------------------------------------------------------- /features/pods.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to have running containers 3 | As a developer 4 | I want to be able to manage pods 5 | 6 | Background: 7 | Given I have a namespace "pods-heaven" 8 | And the namespace "pods-heaven" is ready 9 | 10 | @deletePod 11 | Scenario: I can create a pod 12 | When I create a pod "my-pod" 13 | Then the pod "my-pod" should exists 14 | 15 | @deletePod 16 | Scenario: I can create a pod with environment variables 17 | When I create a pod "env-test" with the following environment variables: 18 | | name | value | 19 | | foo | bar | 20 | | baz | foo | 21 | Then the pod "env-test" should exists 22 | And the pod "env-test" should have the following environment variables: 23 | | name | value | 24 | | foo | bar | 25 | | baz | foo | 26 | 27 | @cleanNamespace 28 | Scenario: I can attach to a container 29 | When I create a pod "commanded" with the command "echo hello; sleep 2; echo step;" 30 | And I attach to the pod "commanded" 31 | Then I should see "step" in the output 32 | 33 | @cleanNamespace 34 | Scenario: I can stream the output of a container 35 | When I create a pod "commanded" with the command "echo hello; sleep 2; echo step;" 36 | And I start streaming the output of the pod "commanded" 37 | Then I should see "step" in the output 38 | -------------------------------------------------------------------------------- /features/secrets.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to use private resources 3 | I want to manage secrets 4 | 5 | Background: 6 | Given I have a namespace "foo" 7 | 8 | @cleanNamespace 9 | Scenario: 10 | When I create a secret "dockercfg" 11 | Then the secret "dockercfg" should exists 12 | -------------------------------------------------------------------------------- /features/services.feature: -------------------------------------------------------------------------------- 1 | Feature: 2 | In order to have components accessible in and outside the cluster 3 | I want to be able to create services 4 | 5 | Background: 6 | Given I have a namespace "foo" 7 | 8 | @deleteService 9 | Scenario: 10 | When I create a service "plop" 11 | Then the service "plop" should exists 12 | 13 | @deleteService 14 | @cleanNamespace 15 | Scenario: 16 | When I create a service "plop" with some non-string values in selector 17 | Then the service "plop" should exists 18 | -------------------------------------------------------------------------------- /integration-tests/tests/GuzzleHttpClientTest.php: -------------------------------------------------------------------------------- 1 | request('get', '/path/', '{"x": "1"}', ['headers' => ['Content-Type' => 'application/json']]); 18 | 19 | // ASSERT 20 | 21 | $expectedResults = [ 22 | 'uri' => 'http://localhost:8089/api/1/path/', 23 | 'body' => '{"x": "1"}', 24 | 'content-type' => 'application/json', 25 | ]; 26 | 27 | $this->assertEquals($expectedResults, json_decode($response, true)); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /integration-tests/webserver/index.php: -------------------------------------------------------------------------------- 1 | $request->getUri(), 9 | 'body' => $request->getContent(), 10 | 'content-type' => $request->headers->get('Content-Type'), 11 | ]; 12 | 13 | echo json_encode($results); 14 | -------------------------------------------------------------------------------- /phpspec.yml: -------------------------------------------------------------------------------- 1 | suites: 2 | kubernetes_client: 3 | namespace: Kubernetes\Client 4 | psr4_prefix: Kubernetes\Client 5 | -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | tests 6 | 7 | 8 | integration-tests 9 | 10 | 11 | -------------------------------------------------------------------------------- /spec/Adapter/Http/AuthenticationMiddlewareSpec.php: -------------------------------------------------------------------------------- 1 | beConstructedWith($httpClient, AuthenticationMiddleware::USERNAME_PASSWORD, 'username:password'); 17 | } 18 | 19 | function it_can_do_an_authenticated_request(HttpClient $httpClient) 20 | { 21 | $this->request('get', 'path/', '?body=something', []); 22 | 23 | $httpClient->request( 24 | 'get', 25 | 'path/', 26 | '?body=something', 27 | [ 'headers' => ['Authorization' => 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',]] 28 | )->shouldHaveBeenCalled(); 29 | } 30 | 31 | function it_do_an_authenticated_request_asynchronously(HttpClient $httpClient) 32 | { 33 | $this->asyncRequest('get', 'path/', '?body=something', []); 34 | 35 | $httpClient->asyncRequest( 36 | 'get', 37 | 'path/', 38 | '?body=something', 39 | [ 'headers' => ['Authorization' => 'Basic dXNlcm5hbWU6cGFzc3dvcmQ=',]] 40 | )->shouldHaveBeenCalled(); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /spec/Adapter/Http/FileHttpClientSpec.php: -------------------------------------------------------------------------------- 1 | beConstructedWith($fileResolver); 14 | } 15 | 16 | function it_returns_the_file_content_for_async_request(FileResolver $fileResolver) 17 | { 18 | $fixtureFile = tempnam(sys_get_temp_dir(), 'spec'); 19 | file_put_contents($fixtureFile, 'the content'); 20 | 21 | $fileResolver->getFilePath(Argument::cetera())->willReturn($fixtureFile); 22 | 23 | $this->asyncRequest('GET', '/foo/bar/baz')->wait()->shouldBe('the content'); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spec/Adapter/Http/HttpNamespaceClientSpec.php: -------------------------------------------------------------------------------- 1 | beConstructedWith($connector, $namespace); 16 | } 17 | 18 | function it_prefixes_the_path_with_namespace_name(KubernetesNamespace $namespace) 19 | { 20 | $namespace->getMetadata()->willReturn(new ObjectMetadata('foo-bar')); 21 | 22 | $this->prefixPath('/pods')->shouldReturn('/namespaces/foo-bar/pods'); 23 | } 24 | 25 | function it_prefixes_the_path_with_namespace_name_and_api(KubernetesNamespace $namespace) 26 | { 27 | $namespace->getMetadata()->willReturn(new ObjectMetadata('foo-bar')); 28 | 29 | $this->prefixPath('/deployments', 'extensions/v1beta1')->shouldReturn('/apis/extensions/v1beta1/namespaces/foo-bar/deployments'); 30 | 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /spec/Adapter/Http/Repository/HttpReplicationControllerRepositorySpec.php: -------------------------------------------------------------------------------- 1 | beConstructedWith($connector, $namespaceClient); 17 | } 18 | 19 | function it_calls_find_all_asynchronously(HttpConnector $connector, NamespaceClient $namespaceClient, PromiseInterface $promise) 20 | { 21 | $namespaceClient->prefixPath('/replicationcontrollers')->willReturn('/something'); 22 | $connector->asyncGet('/something', Argument::type('array'))->willReturn($promise); 23 | 24 | $this->asyncFindAll()->shouldHaveType(PromiseInterface::class); 25 | $this->asyncFindAll()->shouldReturn($promise); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /spec/ClientSpec.php: -------------------------------------------------------------------------------- 1 | beConstructedWith($adapter); 17 | } 18 | 19 | public function it_returns_adapter_node_repository(AdapterInterface $adapter, NodeRepository $nodeRepository) 20 | { 21 | $adapter->getNodeRepository()->shouldBeCalled()->willReturn($nodeRepository); 22 | $this->getNodeRepository()->shouldReturn($nodeRepository); 23 | } 24 | 25 | public function it_returns_adapter_namespace_repository(AdapterInterface $adapter, NamespaceRepository $namespaceRepository) 26 | { 27 | $adapter->getNamespaceRepository()->shouldBeCalled()->willReturn($namespaceRepository); 28 | $this->getNamespaceRepository()->shouldReturn($namespaceRepository); 29 | } 30 | 31 | public function it_returns_namespace_client_from_adapter(AdapterInterface $adapter, KubernetesNamespace $namespace, NamespaceClient $namespaceClient) 32 | { 33 | $adapter->getNamespaceClient($namespace)->shouldBeCalled()->willReturn($namespaceClient); 34 | $this->getNamespaceClient($namespace)->shouldReturn($namespaceClient); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/Adapter/AdapterInterface.php: -------------------------------------------------------------------------------- 1 | connector = $connector; 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | public function findAll() 28 | { 29 | return $this->connector->get('/nodes', [ 30 | 'class' => NodeList::class, 31 | ]); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Client.php: -------------------------------------------------------------------------------- 1 | adapter = $adapter; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getNamespaceClient(KubernetesNamespace $namespace) 29 | { 30 | return $this->adapter->getNamespaceClient($namespace); 31 | } 32 | 33 | /** 34 | * @return NodeRepository 35 | */ 36 | public function getNodeRepository() 37 | { 38 | return $this->adapter->getNodeRepository(); 39 | } 40 | 41 | /** 42 | * @return NamespaceRepository 43 | */ 44 | public function getNamespaceRepository() 45 | { 46 | return $this->adapter->getNamespaceRepository(); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Exception/ClientError.php: -------------------------------------------------------------------------------- 1 | getMessage(), $status->getCode(), $previous); 28 | 29 | $this->status = $status; 30 | $this->request = $request; 31 | 32 | $this->message = $status->getMessage(); 33 | $this->code = $status->getCode(); 34 | } 35 | 36 | /** 37 | * @return Status 38 | */ 39 | public function getStatus() 40 | { 41 | return $this->status; 42 | } 43 | 44 | /** 45 | * @return RequestInterface|null 46 | */ 47 | public function getRequest() 48 | { 49 | return $this->request; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/Exception/CronJobNotFound.php: -------------------------------------------------------------------------------- 1 | objects = $objects; 17 | } 18 | 19 | /** 20 | * @return array 21 | */ 22 | public function getObjects() 23 | { 24 | return $this->objects; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /src/Model/Annotation.php: -------------------------------------------------------------------------------- 1 | name = $name; 30 | $this->containerPort = $containerPort; 31 | $this->protocol = $protocol; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getName() 38 | { 39 | return $this->name; 40 | } 41 | 42 | /** 43 | * @return int 44 | */ 45 | public function getContainerPort() 46 | { 47 | return $this->containerPort; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getProtocol() 54 | { 55 | return $this->protocol; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Model/ContainerStatusState.php: -------------------------------------------------------------------------------- 1 | running; 28 | } 29 | 30 | /** 31 | * @return ContainerStatusStateTerminated 32 | */ 33 | public function getTerminated() 34 | { 35 | return $this->terminated; 36 | } 37 | 38 | /** 39 | * @return ContainerStatusStateWaiting 40 | */ 41 | public function getWaiting() 42 | { 43 | return $this->waiting; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/Model/ContainerStatusStateRunning.php: -------------------------------------------------------------------------------- 1 | startedAt; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Model/ContainerStatusStateTerminated.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class CronJobList implements \IteratorAggregate 12 | { 13 | /** 14 | * @var CronJob[] 15 | */ 16 | private $items = []; 17 | 18 | /** 19 | * @param CronJob[] $cronJobs 20 | * 21 | * @return CronJobList 22 | */ 23 | public static function fromCronJobs(array $cronJobs) 24 | { 25 | $list = new self(); 26 | $list->items = $cronJobs; 27 | 28 | return $list; 29 | } 30 | 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function getIterator() 35 | { 36 | return new \ArrayIterator($this->getCronJobs()); 37 | } 38 | 39 | /** 40 | * @return CronJob[] 41 | */ 42 | public function getCronJobs() 43 | { 44 | return $this->items ?: []; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Model/CronJobStatus.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class CronJobStatus 12 | { 13 | /** 14 | * @var ObjectReference[] 15 | */ 16 | private $active; 17 | 18 | /** 19 | * @var \DateTime 20 | */ 21 | private $lastScheduleTime; 22 | 23 | /** 24 | * CronJobStatus constructor. 25 | * 26 | * @param ObjectReference[] $active 27 | * @param \DateTime $lastScheduleTime 28 | */ 29 | public function __construct(array $active = [], \DateTime $lastScheduleTime = null) 30 | { 31 | $this->active = $active; 32 | $this->lastScheduleTime = $lastScheduleTime; 33 | } 34 | 35 | /** 36 | * @return ObjectReference[] 37 | */ 38 | public function getActive() 39 | { 40 | return $this->active; 41 | } 42 | 43 | /** 44 | * @return \DateTime 45 | */ 46 | public function getLastScheduleTime() 47 | { 48 | return $this->lastScheduleTime; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Model/Deployment.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 30 | $this->specification = $specification; 31 | $this->status = $status; 32 | } 33 | 34 | /** 35 | * @return ObjectMetadata 36 | */ 37 | public function getMetadata() 38 | { 39 | return $this->metadata; 40 | } 41 | 42 | /** 43 | * @return DeploymentSpecification 44 | */ 45 | public function getSpecification() 46 | { 47 | return $this->specification; 48 | } 49 | 50 | /** 51 | * @return DeploymentStatus|null 52 | */ 53 | public function getStatus() 54 | { 55 | return $this->status; 56 | } 57 | 58 | /** 59 | * {@inheritdoc} 60 | */ 61 | public function getKind() 62 | { 63 | return 'Deployment'; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Model/Deployment/DeploymentRollback.php: -------------------------------------------------------------------------------- 1 | 19 | */ 20 | private $updatedAnnotations; 21 | 22 | /** 23 | * @param string $name 24 | * @param RollbackConfiguration $rollbackTo 25 | * @param array $updatedAnnotations 26 | */ 27 | public function __construct($name, RollbackConfiguration $rollbackTo, array $updatedAnnotations = null) 28 | { 29 | $this->name = $name; 30 | $this->rollbackTo = $rollbackTo; 31 | $this->updatedAnnotations = $updatedAnnotations; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getKind() 38 | { 39 | return 'DeploymentRollback'; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getName() 46 | { 47 | return $this->name; 48 | } 49 | 50 | /** 51 | * @return RollbackConfiguration 52 | */ 53 | public function getRollbackTo() 54 | { 55 | return $this->rollbackTo; 56 | } 57 | 58 | /** 59 | * @return array 60 | */ 61 | public function getUpdatedAnnotations() 62 | { 63 | return $this->updatedAnnotations; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Model/Deployment/DeploymentStrategy.php: -------------------------------------------------------------------------------- 1 | type = $type; 29 | $this->rollingUpdate = $rollingUpdate; 30 | } 31 | 32 | /** 33 | * @return string 34 | */ 35 | public function getType() 36 | { 37 | return $this->type; 38 | } 39 | 40 | /** 41 | * @return RollingUpdateDeployment 42 | */ 43 | public function getRollingUpdate() 44 | { 45 | return $this->rollingUpdate; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/Model/Deployment/RollbackConfiguration.php: -------------------------------------------------------------------------------- 1 | revision = $revision; 18 | } 19 | 20 | /** 21 | * @return int 22 | */ 23 | public function getRevision() 24 | { 25 | return $this->revision; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/DeploymentList.php: -------------------------------------------------------------------------------- 1 | items = $deployments; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->getDeployments()); 31 | } 32 | 33 | /** 34 | * @return Deployment[] 35 | */ 36 | public function getDeployments() 37 | { 38 | return $this->items ?: []; 39 | } 40 | 41 | /** 42 | * @return int 43 | */ 44 | public function count() 45 | { 46 | return count($this->getDeployments()); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/EnvironmentVariable.php: -------------------------------------------------------------------------------- 1 | name = $name; 17 | $this->value = $value; 18 | } 19 | 20 | /** 21 | * @return string 22 | */ 23 | public function getName() 24 | { 25 | return $this->name; 26 | } 27 | 28 | /** 29 | * @return string 30 | */ 31 | public function getValue() 32 | { 33 | return $this->value; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Model/EventList.php: -------------------------------------------------------------------------------- 1 | items = $events; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->getEvents()); 31 | } 32 | 33 | /** 34 | * @return Event[] 35 | */ 36 | public function getEvents() 37 | { 38 | return $this->items ?: []; 39 | } 40 | 41 | /** 42 | * @return int 43 | */ 44 | public function count() 45 | { 46 | return count($this->getEvents()); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/EventSource.php: -------------------------------------------------------------------------------- 1 | component = $component; 24 | $this->host = $host; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getComponent() 31 | { 32 | return $this->component; 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getHost() 39 | { 40 | return $this->host; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/ExecAction.php: -------------------------------------------------------------------------------- 1 | command = $command; 20 | } 21 | 22 | /** 23 | * @return array 24 | */ 25 | public function getCommand() 26 | { 27 | return $this->command; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/Model/HttpGetAction.php: -------------------------------------------------------------------------------- 1 | path = $path; 36 | $this->port = $port; 37 | $this->host = $host; 38 | $this->scheme = $scheme; 39 | } 40 | 41 | /** 42 | * @return string 43 | */ 44 | public function getPath() 45 | { 46 | return $this->path; 47 | } 48 | 49 | /** 50 | * @return int 51 | */ 52 | public function getPort() 53 | { 54 | return $this->port; 55 | } 56 | 57 | /** 58 | * @return string 59 | */ 60 | public function getHost() 61 | { 62 | return $this->host; 63 | } 64 | 65 | /** 66 | * @return string 67 | */ 68 | public function getScheme() 69 | { 70 | return $this->scheme; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/Model/IPBlock.php: -------------------------------------------------------------------------------- 1 | cidr = $cidr; 24 | $this->except = $except; 25 | } 26 | 27 | /** 28 | * @return string|null 29 | */ 30 | public function getCidr() 31 | { 32 | return $this->cidr; 33 | } 34 | 35 | /** 36 | * @return string[] 37 | */ 38 | public function getExcept(): array 39 | { 40 | return $this->except ?: []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/Ingress.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 30 | $this->specification = $specification; 31 | $this->status = $status; 32 | } 33 | 34 | /** 35 | * @return IngressSpecification|null 36 | */ 37 | public function getSpecification() 38 | { 39 | return $this->specification; 40 | } 41 | 42 | /** 43 | * @return IngressStatus|null 44 | */ 45 | public function getStatus() 46 | { 47 | return $this->status; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getKind() 54 | { 55 | return 'Ingress'; 56 | } 57 | 58 | /** 59 | * {@inheritdoc} 60 | */ 61 | public function getMetadata() 62 | { 63 | return $this->metadata; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Model/IngressBackend.php: -------------------------------------------------------------------------------- 1 | serviceName = $serviceName; 24 | $this->servicePort = $servicePort; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getServiceName() 31 | { 32 | return $this->serviceName; 33 | } 34 | 35 | /** 36 | * @return int 37 | */ 38 | public function getServicePort() 39 | { 40 | return $this->servicePort; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/IngressHttpRule.php: -------------------------------------------------------------------------------- 1 | paths = $paths; 18 | } 19 | 20 | /** 21 | * @return IngressHttpRulePath[] 22 | */ 23 | public function getPaths(): array 24 | { 25 | return $this->paths; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/IngressHttpRulePath.php: -------------------------------------------------------------------------------- 1 | backend = $backend; 24 | $this->path = $path; 25 | } 26 | 27 | /** 28 | * @return IngressBackend 29 | */ 30 | public function getBackend(): IngressBackend 31 | { 32 | return $this->backend; 33 | } 34 | 35 | /** 36 | * @return null|string 37 | */ 38 | public function getPath() 39 | { 40 | return $this->path; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/IngressList.php: -------------------------------------------------------------------------------- 1 | items = $ingresses; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->getIngresses()); 31 | } 32 | 33 | /** 34 | * @return Ingress[] 35 | */ 36 | public function getIngresses() 37 | { 38 | return $this->items ?: []; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Model/IngressRule.php: -------------------------------------------------------------------------------- 1 | host = $host; 24 | $this->http = $http; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getHost(): string 31 | { 32 | return $this->host; 33 | } 34 | 35 | /** 36 | * @return IngressHttpRule|null 37 | */ 38 | public function getHttp() 39 | { 40 | return $this->http; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/IngressSpecification.php: -------------------------------------------------------------------------------- 1 | backend = $backend; 30 | $this->tls = $tls; 31 | $this->rules = $rules; 32 | } 33 | 34 | /** 35 | * @return IngressBackend|null 36 | */ 37 | public function getBackend() 38 | { 39 | return $this->backend; 40 | } 41 | 42 | /** 43 | * @return IngressTls[] 44 | */ 45 | public function getTls() 46 | { 47 | return $this->tls; 48 | } 49 | 50 | /** 51 | * @return IngressRule[] 52 | */ 53 | public function getRules(): array 54 | { 55 | return $this->rules ?: []; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Model/IngressStatus.php: -------------------------------------------------------------------------------- 1 | loadBalancer = $loadBalancer; 18 | } 19 | 20 | /** 21 | * @return LoadBalancerStatus 22 | */ 23 | public function getLoadBalancer() 24 | { 25 | return $this->loadBalancer; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/IngressTls.php: -------------------------------------------------------------------------------- 1 | secretName = $secretName; 24 | $this->hosts = $hosts; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getSecretName() 31 | { 32 | return $this->secretName; 33 | } 34 | 35 | /** 36 | * @return string[]|null 37 | */ 38 | public function getHosts() 39 | { 40 | return $this->hosts; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/JobList.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class JobList implements \IteratorAggregate 12 | { 13 | /** 14 | * @var Job[] 15 | */ 16 | private $items = []; 17 | 18 | /** 19 | * @param Job[] $jobs 20 | * 21 | * @return JobList 22 | */ 23 | public static function fromJobs(array $jobs) 24 | { 25 | $list = new self(); 26 | $list->items = $jobs; 27 | 28 | return $list; 29 | } 30 | 31 | /** 32 | * {@inheritdoc} 33 | */ 34 | public function getIterator() 35 | { 36 | return new \ArrayIterator($this->getJobs()); 37 | } 38 | 39 | /** 40 | * @return Job[] 41 | */ 42 | public function getJobs() 43 | { 44 | return $this->items ?: []; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/Model/JobSelector.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class JobSelector 12 | { 13 | /** 14 | * @var array 15 | */ 16 | private $matchLabels = []; 17 | 18 | /** 19 | * @var JobSelectorRequirement[] 20 | */ 21 | private $matchExpressions = []; 22 | 23 | /** 24 | * @param array $matchLabels 25 | * @param JobSelectorRequirement[] $matchExpressions 26 | */ 27 | public function __construct(array $matchLabels = null, array $matchExpressions = null) 28 | { 29 | $this->matchLabels = $matchLabels; 30 | $this->matchExpressions = $matchExpressions; 31 | } 32 | 33 | /** 34 | * @return array 35 | */ 36 | public function getMatchLabels() 37 | { 38 | return $this->matchLabels; 39 | } 40 | 41 | /** 42 | * @return JobSelectorRequirement[] 43 | */ 44 | public function getMatchExpressions() 45 | { 46 | return $this->matchExpressions; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/JobSelectorRequirement.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class JobSelectorRequirement 12 | { 13 | /** 14 | * @var string 15 | */ 16 | private $key; 17 | 18 | /** 19 | * @var string 20 | */ 21 | private $operator; 22 | 23 | /** 24 | * @var string[]|null 25 | */ 26 | private $values; 27 | 28 | /** 29 | * @param string $key 30 | * @param string $operator 31 | * @param string[] $values 32 | */ 33 | public function __construct($key, $operator, array $values = null) 34 | { 35 | $this->key = $key; 36 | $this->operator = $operator; 37 | $this->values = $values; 38 | } 39 | 40 | /** 41 | * @return string 42 | */ 43 | public function getKey() 44 | { 45 | return $this->key; 46 | } 47 | 48 | /** 49 | * @return string 50 | */ 51 | public function getOperator() 52 | { 53 | return $this->operator; 54 | } 55 | 56 | /** 57 | * @return string[]|null 58 | */ 59 | public function getValues() 60 | { 61 | return $this->values; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /src/Model/JobStatusCondition.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class JobStatusCondition 12 | { 13 | /** 14 | * @var string 15 | */ 16 | private $type; 17 | 18 | /** 19 | * @var bool 20 | */ 21 | private $status; 22 | 23 | /** 24 | * @param string $type 25 | * @param bool $status 26 | */ 27 | public function __construct($type, $status) 28 | { 29 | $this->type = $type; 30 | $this->status = $status; 31 | } 32 | 33 | /** 34 | * @return string 35 | */ 36 | public function getType() 37 | { 38 | return $this->type; 39 | } 40 | 41 | /** 42 | * @return bool 43 | */ 44 | public function isStatus() 45 | { 46 | return $this->status; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/JobTemplateSpecification.php: -------------------------------------------------------------------------------- 1 | 9 | * @author Nicolas Macherey 10 | */ 11 | class JobTemplateSpecification 12 | { 13 | /** 14 | * @var ObjectMetadata 15 | */ 16 | private $metadata; 17 | 18 | /** 19 | * @var JobSpecification 20 | */ 21 | private $podSpecification; 22 | 23 | /** 24 | * @param ObjectMetadata $metadata 25 | * @param JobSpecification $podSpecification 26 | */ 27 | public function __construct(ObjectMetadata $metadata, JobSpecification $podSpecification) 28 | { 29 | $this->metadata = $metadata; 30 | $this->podSpecification = $podSpecification; 31 | } 32 | 33 | /** 34 | * @return ObjectMetadata 35 | */ 36 | public function getMetadata() 37 | { 38 | return $this->metadata; 39 | } 40 | 41 | /** 42 | * @return JobSpecification 43 | */ 44 | public function getJobSpecification() 45 | { 46 | return $this->podSpecification; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/KeyValueObject.php: -------------------------------------------------------------------------------- 1 | key = $key; 13 | $this->value = $value; 14 | } 15 | 16 | /** 17 | * @return string 18 | */ 19 | public function getKey() 20 | { 21 | return $this->key; 22 | } 23 | 24 | /** 25 | * @return string 26 | */ 27 | public function getValue() 28 | { 29 | return $this->value; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Model/KubernetesNamespace.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 23 | } 24 | 25 | /** 26 | * @return ObjectMetadata 27 | */ 28 | public function getMetadata() 29 | { 30 | return $this->metadata; 31 | } 32 | 33 | /** 34 | * @return NamespaceStatus 35 | */ 36 | public function getStatus() 37 | { 38 | return $this->status; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Model/KubernetesObject.php: -------------------------------------------------------------------------------- 1 | ip = $ip; 24 | $this->hostname = $hostname; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getIp() 31 | { 32 | return $this->ip; 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getHostname() 39 | { 40 | return $this->hostname; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/LoadBalancerStatus.php: -------------------------------------------------------------------------------- 1 | ingresses = $ingresses; 18 | } 19 | 20 | /** 21 | * @return LoadBalancerIngress[] 22 | */ 23 | public function getIngresses() 24 | { 25 | return $this->ingresses; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/LocalObjectReference.php: -------------------------------------------------------------------------------- 1 | name = $name; 18 | } 19 | 20 | /** 21 | * @return string 22 | */ 23 | public function getName() 24 | { 25 | return $this->name; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/NamespaceList.php: -------------------------------------------------------------------------------- 1 | items = $items; 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | public function getIterator() 24 | { 25 | return new \ArrayIterator($this->getNamespaces()); 26 | } 27 | 28 | /** 29 | * @return KubernetesNamespace[] 30 | */ 31 | public function getNamespaces() 32 | { 33 | return $this->items ?: []; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Model/NamespaceStatus.php: -------------------------------------------------------------------------------- 1 | phase; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicy.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 23 | $this->spec = $spec; 24 | } 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | public function getKind() 30 | { 31 | return 'NetworkPolicy'; 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | public function getMetadata() 38 | { 39 | return $this->metadata; 40 | } 41 | 42 | /** 43 | * @return NetworkPolicySpec 44 | */ 45 | public function getSpec(): NetworkPolicySpec 46 | { 47 | return $this->spec; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicyEgressRule.php: -------------------------------------------------------------------------------- 1 | to = $to; 24 | $this->ports = $ports; 25 | } 26 | 27 | /** 28 | * @return NetworkPolicyPort[] 29 | */ 30 | public function getPorts(): array 31 | { 32 | return $this->ports ?: []; 33 | } 34 | 35 | /** 36 | * @return NetworkPolicyPeer[] 37 | */ 38 | public function getTo(): array 39 | { 40 | return $this->to ?: []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicyIngressRule.php: -------------------------------------------------------------------------------- 1 | from = $from; 24 | $this->ports = $ports; 25 | } 26 | 27 | /** 28 | * @return NetworkPolicyPeer[] 29 | */ 30 | public function getFrom(): array 31 | { 32 | return $this->from ?: []; 33 | } 34 | 35 | /** 36 | * @return NetworkPolicyPort[] 37 | */ 38 | public function getPorts(): array 39 | { 40 | return $this->ports ?: []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicyList.php: -------------------------------------------------------------------------------- 1 | items = $policies; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->items); 31 | } 32 | 33 | /** 34 | * @return int 35 | */ 36 | public function count() 37 | { 38 | return count($this->items); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicyPeer.php: -------------------------------------------------------------------------------- 1 | ipBlock = $ipBlock; 28 | $this->namespaceSelector = $namespaceSelector; 29 | $this->podSelector = $podSelector; 30 | } 31 | 32 | /** 33 | * @return IPBlock|null 34 | */ 35 | public function getIpBlock() 36 | { 37 | return $this->ipBlock; 38 | } 39 | 40 | /** 41 | * @return LabelSelector|null 42 | */ 43 | public function getNamespaceSelector() 44 | { 45 | return $this->namespaceSelector; 46 | } 47 | 48 | /** 49 | * @return LabelSelector|null 50 | */ 51 | public function getPodSelector() 52 | { 53 | return $this->podSelector; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /src/Model/NetworkPolicy/NetworkPolicyPort.php: -------------------------------------------------------------------------------- 1 | port = $port; 20 | $this->protocol = $protocol; 21 | } 22 | 23 | /** 24 | * @return int 25 | */ 26 | public function getPort(): int 27 | { 28 | return $this->port; 29 | } 30 | 31 | /** 32 | * @return null|string 33 | */ 34 | public function getProtocol() 35 | { 36 | return $this->protocol; 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/Model/Node.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 29 | $this->specification = $specification; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/Model/NodeAddress.php: -------------------------------------------------------------------------------- 1 | items = $items; 18 | } 19 | 20 | /** 21 | * {@inheritdoc} 22 | */ 23 | public function getIterator() 24 | { 25 | return new \ArrayIterator($this->getNodes()); 26 | } 27 | 28 | /** 29 | * @return Node[] 30 | */ 31 | public function getNodes() 32 | { 33 | return $this->items ?: []; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/Model/NodeSpecification.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 30 | $this->specification = $specification; 31 | $this->status = $status; 32 | } 33 | 34 | /** 35 | * @return ObjectMetadata 36 | */ 37 | public function getMetadata() 38 | { 39 | return $this->metadata; 40 | } 41 | 42 | /** 43 | * {@inheritdoc} 44 | */ 45 | public function getKind() 46 | { 47 | return 'PersistentVolumeClaim'; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Model/PersistentVolumeClaimSpecification.php: -------------------------------------------------------------------------------- 1 | 13 | */ 14 | private $accessModes; 15 | 16 | /** 17 | * @var ResourceRequirements 18 | */ 19 | private $resources; 20 | 21 | /** 22 | * @param array $accessModes 23 | * @param ResourceRequirements $resources 24 | */ 25 | public function __construct(array $accessModes, ResourceRequirements $resources) 26 | { 27 | $this->accessModes = $accessModes; 28 | $this->resources = $resources; 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /src/Model/PersistentVolumeClaimStatus.php: -------------------------------------------------------------------------------- 1 | phase; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/Model/PodList.php: -------------------------------------------------------------------------------- 1 | items = $pods; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->getPods()); 31 | } 32 | 33 | /** 34 | * @return Pod[] 35 | */ 36 | public function getPods() 37 | { 38 | return $this->items ?: []; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Model/PodSelector.php: -------------------------------------------------------------------------------- 1 | 9 | */ 10 | private $matchLabels = []; 11 | 12 | /** 13 | * @var PodSelectorRequirement[] 14 | */ 15 | private $matchExpressions = []; 16 | 17 | /** 18 | * @param array $matchLabels 19 | * @param PodSelectorRequirement[] $matchExpressions 20 | */ 21 | public function __construct(array $matchLabels = [], array $matchExpressions = []) 22 | { 23 | $this->matchLabels = $matchLabels; 24 | $this->matchExpressions = $matchExpressions; 25 | } 26 | 27 | /** 28 | * @return array 29 | */ 30 | public function getMatchLabels() 31 | { 32 | return $this->matchLabels ?: []; 33 | } 34 | 35 | /** 36 | * @return PodSelectorRequirement[] 37 | */ 38 | public function getMatchExpressions() 39 | { 40 | return $this->matchExpressions ?: []; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/PodSelectorRequirement.php: -------------------------------------------------------------------------------- 1 | key = $key; 30 | $this->operator = $operator; 31 | $this->values = $values; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getKey() 38 | { 39 | return $this->key; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getOperator() 46 | { 47 | return $this->operator; 48 | } 49 | 50 | /** 51 | * @return string[]|null 52 | */ 53 | public function getValues() 54 | { 55 | return $this->values; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Model/PodStatusCondition.php: -------------------------------------------------------------------------------- 1 | type = $type; 24 | $this->status = $status; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getType() 31 | { 32 | return $this->type; 33 | } 34 | 35 | /** 36 | * @return bool 37 | */ 38 | public function isStatus() 39 | { 40 | return $this->status; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/PodTemplateSpecification.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 24 | $this->podSpecification = $podSpecification; 25 | } 26 | 27 | /** 28 | * @return ObjectMetadata 29 | */ 30 | public function getMetadata() 31 | { 32 | return $this->metadata; 33 | } 34 | 35 | /** 36 | * @return PodSpecification 37 | */ 38 | public function getPodSpecification() 39 | { 40 | return $this->podSpecification; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/RBAC/ClusterRole.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 27 | $this->rules = $rules; 28 | } 29 | 30 | /** 31 | * {@inheritdoc} 32 | */ 33 | public function getKind() 34 | { 35 | return 'Role'; 36 | } 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function getMetadata() 42 | { 43 | return $this->metadata; 44 | } 45 | 46 | /** 47 | * @return array|PolicyRule[] 48 | */ 49 | public function getRules() 50 | { 51 | return $this->rules ?: []; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /src/Model/RBAC/RoleBinding.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 33 | $this->roleRef = $roleRef; 34 | $this->subjects = $subjects; 35 | } 36 | 37 | /** 38 | * {@inheritdoc} 39 | */ 40 | public function getKind() 41 | { 42 | return 'RoleBinding'; 43 | } 44 | 45 | /** 46 | * {@inheritdoc} 47 | */ 48 | public function getMetadata(): ObjectMetadata 49 | { 50 | return $this->metadata; 51 | } 52 | 53 | /** 54 | * @return RoleRef 55 | */ 56 | public function getRoleRef(): RoleRef 57 | { 58 | return $this->roleRef; 59 | } 60 | 61 | /** 62 | * @return array|Subject[] 63 | */ 64 | public function getSubjects() 65 | { 66 | return $this->subjects ?: []; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/Model/RBAC/RoleRef.php: -------------------------------------------------------------------------------- 1 | apiGroup = $apiGroup; 30 | $this->kind = $kind; 31 | $this->name = $name; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getApiGroup(): string 38 | { 39 | return $this->apiGroup; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getKind(): string 46 | { 47 | return $this->kind; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getName(): string 54 | { 55 | return $this->name; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Model/RBAC/Subject.php: -------------------------------------------------------------------------------- 1 | kind = $kind; 33 | $this->namespace = $namespace; 34 | $this->name = $name; 35 | $this->apiVersion = $apiVersion; 36 | } 37 | 38 | /** 39 | * @return string 40 | */ 41 | public function getKind(): string 42 | { 43 | return $this->kind; 44 | } 45 | 46 | /** 47 | * @return string 48 | */ 49 | public function getName(): string 50 | { 51 | return $this->name; 52 | } 53 | 54 | /** 55 | * @return string|null 56 | */ 57 | public function getNamespace() 58 | { 59 | return $this->namespace; 60 | } 61 | 62 | /** 63 | * @return null|string 64 | */ 65 | public function getApiVersion() 66 | { 67 | return $this->apiVersion; 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /src/Model/ReplicationController.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 24 | $this->specification = $specification; 25 | } 26 | 27 | /** 28 | * @return ObjectMetadata 29 | */ 30 | public function getMetadata() 31 | { 32 | return $this->metadata; 33 | } 34 | 35 | /** 36 | * @return ReplicationControllerSpecification 37 | */ 38 | public function getSpecification() 39 | { 40 | return $this->specification; 41 | } 42 | 43 | /** 44 | * {@inheritdoc} 45 | */ 46 | public function getKind() 47 | { 48 | return 'ReplicationController'; 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /src/Model/ReplicationControllerList.php: -------------------------------------------------------------------------------- 1 | items = $replicationControllers; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->getReplicationControllers()); 31 | } 32 | 33 | /** 34 | * @return ReplicationController[] 35 | */ 36 | public function getReplicationControllers() 37 | { 38 | return $this->items ?: []; 39 | } 40 | 41 | /** 42 | * @return int 43 | */ 44 | public function count() 45 | { 46 | return count($this->getReplicationControllers()); 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/Model/ResourceLimits.php: -------------------------------------------------------------------------------- 1 | memory = $memory; 24 | $this->cpu = $cpu; 25 | } 26 | 27 | /** 28 | * @return string 29 | */ 30 | public function getMemory() 31 | { 32 | return $this->memory; 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getCpu() 39 | { 40 | return $this->cpu; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/ResourceRequirements.php: -------------------------------------------------------------------------------- 1 | requests = $requests; 24 | $this->limits = $limits; 25 | } 26 | 27 | /** 28 | * @return ResourceRequirementsRequests 29 | */ 30 | public function getRequests() 31 | { 32 | return $this->requests; 33 | } 34 | 35 | /** 36 | * @return ResourceLimits 37 | */ 38 | public function getLimits() 39 | { 40 | return $this->limits; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/Model/ResourceRequirementsRequests.php: -------------------------------------------------------------------------------- 1 | storage = $storage; 30 | $this->memory = $memory; 31 | $this->cpu = $cpu; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getCpu() 38 | { 39 | return $this->cpu; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getStorage() 46 | { 47 | return $this->storage; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getMemory() 54 | { 55 | return $this->memory; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/Model/Secret.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 30 | $this->data = $data; 31 | $this->type = $type; 32 | } 33 | 34 | /** 35 | * @return ObjectMetadata 36 | */ 37 | public function getMetadata() 38 | { 39 | return $this->metadata; 40 | } 41 | 42 | /** 43 | * @return array 44 | */ 45 | public function getData() 46 | { 47 | return $this->data; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getType() 54 | { 55 | return $this->type; 56 | } 57 | 58 | /** 59 | * @return string 60 | */ 61 | public function getKind() 62 | { 63 | return 'Secret'; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Model/SecurityContext.php: -------------------------------------------------------------------------------- 1 | privileged = $privileged; 18 | } 19 | 20 | /** 21 | * @return bool 22 | */ 23 | public function isPrivileged() 24 | { 25 | return $this->privileged; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/ServiceAccount.php: -------------------------------------------------------------------------------- 1 | metadata = $metadata; 30 | $this->secrets = $secrets; 31 | $this->imagePullSecrets = $imagePullSecrets; 32 | } 33 | 34 | /** 35 | * {@inheritdoc} 36 | */ 37 | public function getKind() 38 | { 39 | return 'ServiceAccount'; 40 | } 41 | 42 | /** 43 | * {@inheritdoc} 44 | */ 45 | public function getMetadata() 46 | { 47 | return $this->metadata; 48 | } 49 | 50 | /** 51 | * @return ObjectReference[] 52 | */ 53 | public function getSecrets() 54 | { 55 | return $this->secrets ?: []; 56 | } 57 | 58 | /** 59 | * @return LocalObjectReference[] 60 | */ 61 | public function getImagePullSecrets() 62 | { 63 | return $this->imagePullSecrets ?: []; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/Model/ServiceList.php: -------------------------------------------------------------------------------- 1 | items = $services; 21 | 22 | return $list; 23 | } 24 | 25 | /** 26 | * {@inheritdoc} 27 | */ 28 | public function getIterator() 29 | { 30 | return new \ArrayIterator($this->items); 31 | } 32 | 33 | /** 34 | * @return Service[] 35 | */ 36 | public function getServices() 37 | { 38 | return $this->items; 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /src/Model/ServiceStatus.php: -------------------------------------------------------------------------------- 1 | loadBalancer = $loadBalancer; 18 | } 19 | 20 | /** 21 | * @return LoadBalancerStatus 22 | */ 23 | public function getLoadBalancer() 24 | { 25 | return $this->loadBalancer; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/Status.php: -------------------------------------------------------------------------------- 1 | status = $status; 39 | $this->message = $message; 40 | $this->reason = $reason; 41 | $this->code = $code; 42 | } 43 | 44 | /** 45 | * @return string 46 | */ 47 | public function getStatus() 48 | { 49 | return $this->status; 50 | } 51 | 52 | /** 53 | * @return string 54 | */ 55 | public function getMessage() 56 | { 57 | return $this->message; 58 | } 59 | 60 | /** 61 | * @return string 62 | */ 63 | public function getReason() 64 | { 65 | return $this->reason; 66 | } 67 | 68 | /** 69 | * @return int 70 | */ 71 | public function getCode() 72 | { 73 | return $this->code; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /src/Model/TcpSocketAction.php: -------------------------------------------------------------------------------- 1 | port = $port; 18 | } 19 | 20 | /** 21 | * @return int 22 | */ 23 | public function getPort() 24 | { 25 | return $this->port; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/Volume/EmptyDirVolumeSource.php: -------------------------------------------------------------------------------- 1 | path = $path; 18 | } 19 | 20 | /** 21 | * @return string 22 | */ 23 | public function getPath() 24 | { 25 | return $this->path; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/Volume/NfsVolumeSource.php: -------------------------------------------------------------------------------- 1 | server = $server; 30 | $this->path = $path; 31 | $this->readOnly = $readOnly; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /src/Model/Volume/PersistentVolumeClaimSource.php: -------------------------------------------------------------------------------- 1 | claimName = $claimName; 18 | } 19 | 20 | /** 21 | * @return string 22 | */ 23 | public function getClaimName() 24 | { 25 | return $this->claimName; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/Model/VolumeMount.php: -------------------------------------------------------------------------------- 1 | name = $name; 30 | $this->mountPath = $mountPath; 31 | $this->readOnly = $readOnly; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getName() 38 | { 39 | return $this->name; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getMountPath() 46 | { 47 | return $this->mountPath; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/Repository/EventRepository.php: -------------------------------------------------------------------------------- 1 | specificRepository = $specificRepository; 21 | } 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | public function findOneByName($name) 26 | { 27 | return $this->specificRepository->findOneByName($name); 28 | } 29 | 30 | /** 31 | * {@inheritdoc} 32 | */ 33 | public function create(KubernetesObject $object) 34 | { 35 | return $this->specificRepository->create($object); 36 | } 37 | 38 | /** 39 | * {@inheritdoc} 40 | */ 41 | public function update(KubernetesObject $object) 42 | { 43 | return $this->specificRepository->update($object); 44 | } 45 | 46 | /** 47 | * {@inheritdoc} 48 | */ 49 | public function exists($name) 50 | { 51 | try { 52 | $this->findOneByName($name); 53 | 54 | return true; 55 | } catch (ObjectNotFound $e) { 56 | return false; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Container.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Container: 2 | properties: 3 | name: 4 | type: string 5 | image: 6 | type: string 7 | pullPolicy: 8 | type: string 9 | serialized_name: imagePullPolicy 10 | environmentVariables: 11 | type: array 12 | serialized_name: env 13 | ports: 14 | type: array 15 | volumeMounts: 16 | type: array 17 | serialized_name: volumeMounts 18 | command: 19 | type: array 20 | args: 21 | type: array 22 | securityContext: 23 | type: Kubernetes\Client\Model\SecurityContext 24 | serialized_name: securityContext 25 | resources: 26 | type: Kubernetes\Client\Model\ResourceRequirements 27 | livenessProbe: 28 | type: Kubernetes\Client\Model\Probe 29 | serialized_name: livenessProbe 30 | readinessProbe: 31 | type: Kubernetes\Client\Model\Probe 32 | serialized_name: readinessProbe 33 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerPort.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerPort: 2 | properties: 3 | name: 4 | type: string 5 | containerPort: 6 | type: integer 7 | serialized_name: containerPort 8 | protocol: 9 | type: string 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerStatus: 2 | properties: 3 | name: 4 | type: string 5 | restartCount: 6 | type: integer 7 | serialized_name: restartCount 8 | containerId: 9 | type: string 10 | serialized_name: containerID 11 | state: 12 | type: Kubernetes\Client\Model\ContainerStatusState 13 | ready: 14 | type: boolean 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerStatusState.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerStatusState: 2 | properties: 3 | running: 4 | type: Kubernetes\Client\Model\ContainerStatusStateRunning 5 | terminated: 6 | type: Kubernetes\Client\Model\ContainerStatusStateTerminated 7 | waiting: 8 | type: Kubernetes\Client\Model\ContainerStatusStateWaiting 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerStatusStateRunning.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerStatusStateRunning: 2 | properties: 3 | startedAt: 4 | type: DateTime 5 | serialized_name: startedAt 6 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerStatusStateTerminated.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerStatusStateTerminated: 2 | properties: 3 | exitCode: 4 | type: integer 5 | serialized_name: exitCode 6 | message: 7 | type: string 8 | reason: 9 | type: string 10 | startedAt: 11 | type: DateTime 12 | serialized_name: startedAt 13 | finishedAt: 14 | type: DateTime 15 | serialized_name: finishedAt 16 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ContainerStatusStateWaiting.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ContainerStatusStateWaiting: 2 | properties: 3 | reason: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.CronJob.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\CronJob: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\CronJobSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\CronJobStatus 14 | groups: [view] 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.CronJobSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\CronJobSpecification: 2 | properties: 3 | schedule: 4 | type: string 5 | jobTemplate: 6 | type: Kubernetes\Client\Model\JobTemplateSpecification 7 | serialized_name: jobTemplate 8 | concurrencyPolicy: 9 | type: string 10 | serialized_name: concurrencyPolicy 11 | failedJobsHistoryLimit: 12 | type: integer 13 | serialized_name: failedJobsHistoryLimit 14 | startingDeadlineSeconds: 15 | type: integer 16 | serialized_name: startingDeadlineSeconds 17 | successfulJobsHistoryLimit: 18 | type: integer 19 | serialized_name: successfulJobsHistoryLimit 20 | suspend: 21 | type: boolean 22 | 23 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.CronJobStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\CronJobStatus: 2 | properties: 3 | lastScheduleTime: 4 | type: DateTime 5 | serialized_name: lastScheduleTime 6 | active: 7 | type: array 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Deployment.DeploymentStrategy.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Deployment\DeploymentStrategy: 2 | properties: 3 | type: 4 | type: string 5 | rollingUpdate: 6 | type: Kubernetes\Client\Model\Deployment\RollingUpdateDeployment 7 | serialized_name: rollingUpdate 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Deployment.RollbackConfiguration.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Deployment\RollbackConfiguration: 2 | properties: 3 | revision: 4 | type: integer 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Deployment.RollingUpdateDeployment.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Deployment\RollingUpdateDeployment: 2 | properties: 3 | maxUnavailable: 4 | type: stringOrInteger 5 | serialized_name: maxUnavailable 6 | maxSurge: 7 | type: stringOrInteger 8 | serialized_name: maxSurge 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Deployment.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Deployment: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\DeploymentSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\DeploymentStatus 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.DeploymentList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\DeploymentList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.DeploymentSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\DeploymentSpecification: 2 | properties: 3 | replicas: 4 | type: integer 5 | serialized_name: replicas 6 | selector: 7 | type: Kubernetes\Client\Model\PodSelector 8 | serialized_name: selector 9 | template: 10 | type: Kubernetes\Client\Model\PodTemplateSpecification 11 | serialized_name: template 12 | strategy: 13 | type: Kubernetes\Client\Model\Deployment\DeploymentStrategy 14 | serialized_name: strategy 15 | minReadySeconds: 16 | type: integer 17 | serialized_name: minReadySeconds 18 | revisionHistoryLimit: 19 | type: integer 20 | serialized_name: revisionHistoryLimit 21 | paused: 22 | type: boolean 23 | serialized_name: paused 24 | rollbackTo: 25 | type: integer 26 | serialized_name: Kubernetes\Client\Model\Deployment\RollbackConfiguration 27 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.DeploymentStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\DeploymentStatus: 2 | properties: 3 | observedGeneration: 4 | type: integer 5 | serialized_name: observedGeneration 6 | replicas: 7 | type: integer 8 | serialized_name: replicas 9 | updatedReplicas: 10 | type: integer 11 | serialized_name: updatedReplicas 12 | availableReplicas: 13 | type: integer 14 | serialized_name: availableReplicas 15 | unavailableReplicas: 16 | type: integer 17 | serialized_name: unavailableReplicas 18 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.EnvironmentVariable.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\EnvironmentVariable: 2 | properties: 3 | name: 4 | type: string 5 | value: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Event.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Event: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | involvedObject: 10 | type: Kubernetes\Client\Model\ObjectReference 11 | serialized_name: involvedObject 12 | source: 13 | type: Kubernetes\Client\Model\EventSource 14 | reason: 15 | type: string 16 | message: 17 | type: string 18 | firstTimestamp: 19 | type: string 20 | serialized_name: firstTimestamp 21 | lastTimestamp: 22 | type: string 23 | serialized_name: lastTimestamp 24 | count: 25 | type: integer 26 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.EventList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\EventList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.EventSource.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\EventSource: 2 | properties: 3 | component: 4 | type: string 5 | host: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ExecAction.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ExecAction: 2 | properties: 3 | command: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.HttpGetAction.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\HttpGetAction: 2 | properties: 3 | path: 4 | type: string 5 | port: 6 | type: integer 7 | host: 8 | type: string 9 | scheme: 10 | type: string 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IPBlock.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IPBlock: 2 | properties: 3 | cidr: 4 | type: string 5 | except: 6 | type: array 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Ingress.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Ingress: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\IngressSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\IngressStatus 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressBackend.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressBackend: 2 | properties: 3 | serviceName: 4 | type: string 5 | serialized_name: serviceName 6 | servicePort: 7 | type: integer 8 | serialized_name: servicePort 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressHttpRule.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressHttpRule: 2 | properties: 3 | paths: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressHttpRulePath.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressHttpRulePath: 2 | properties: 3 | backend: 4 | type: Kubernetes\Client\Model\IngressBackend 5 | path: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressRule.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressRule: 2 | properties: 3 | host: 4 | type: string 5 | http: 6 | type: Kubernetes\Client\Model\IngressHttpRule 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressSpecification: 2 | properties: 3 | backend: 4 | type: Kubernetes\Client\Model\IngressBackend 5 | tls: 6 | type: array 7 | rules: 8 | type: array 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressStatus: 2 | properties: 3 | loadBalancer: 4 | type: Kubernetes\Client\Model\LoadBalancerStatus 5 | serialized_name: loadBalancer 6 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.IngressTls.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\IngressTls: 2 | properties: 3 | secretName: 4 | type: string 5 | serialized_name: secretName 6 | hosts: 7 | type: array 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Job.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Job: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\JobSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\JobStatus 14 | groups: [view] 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobSelector.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobSelector: 2 | properties: 3 | matchLabels: 4 | type: array 5 | serialized_name: matchLabels 6 | matchExpressions: 7 | type: array 8 | serialized_name: matchExpressions 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobSelectorRequirement.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobSelectorRequirement: 2 | properties: 3 | key: 4 | type: string 5 | operator: 6 | type: string 7 | values: 8 | type: array 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobSpecification: 2 | properties: 3 | completions: 4 | type: integer 5 | manualSelector: 6 | type: boolean 7 | serialized_name: manualSelector 8 | parallelism: 9 | type: integer 10 | serialized_name: parallelism 11 | selector: 12 | type: Kubernetes\Client\Model\JobSelector 13 | template: 14 | type: Kubernetes\Client\Model\PodTemplateSpecification 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobStatus: 2 | properties: 3 | active: 4 | type: integer 5 | conditions: 6 | type: array 7 | serialized_name: Condition 8 | failed: 9 | type: integer 10 | succeeded: 11 | type: integer 12 | completionTime: 13 | type: DateTime 14 | serialized_name: completionTime 15 | startTime: 16 | type: DateTime 17 | serialized_name: startTime 18 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobStatusCondition.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobStatusCondition: 2 | properties: 3 | type: 4 | type: string 5 | status: 6 | type: boolean 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.JobTemplateSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\JobTemplateSpecification: 2 | properties: 3 | metadata: 4 | type: Kubernetes\Client\Model\ObjectMetadata 5 | podSpecification: 6 | type: Kubernetes\Client\Model\JobSpecification 7 | serialized_name: spec 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.KubernetesNamespace.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\KubernetesNamespace: 2 | properties: 3 | metadata: 4 | type: Kubernetes\Client\Model\ObjectMetadata 5 | status: 6 | type: Kubernetes\Client\Model\NamespaceStatus 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.LabelSelector.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\LabelSelector: 2 | properties: 3 | matchLabels: 4 | type: array 5 | serialized_name: matchLabels 6 | matchExpressions: 7 | type: array 8 | serialized_name: matchExpressions 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.LoadBalancerIngress.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\LoadBalancerIngress: 2 | properties: 3 | ip: 4 | type: string 5 | hostname: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.LoadBalancerStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\LoadBalancerStatus: 2 | properties: 3 | ingresses: 4 | serialized_name: ingress 5 | type: array 6 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.LocalObjectReference.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\LocalObjectReference: 2 | properties: 3 | name: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NamespaceList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NamespaceList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NamespaceStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NamespaceStatus: 2 | properties: 3 | phase: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicy.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicy: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | spec: 10 | type: Kubernetes\Client\Model\NetworkPolicy\NetworkPolicySpec 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicyEgressRule.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicyEgressRule: 2 | properties: 3 | to: 4 | type: array 5 | ports: 6 | type: array 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicyIngressRule.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicyIngressRule: 2 | properties: 3 | from: 4 | type: array 5 | ports: 6 | type: array 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicyList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicyList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicyPeer.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicyPeer: 2 | properties: 3 | ipBlock: 4 | type: Kubernetes\Client\Model\IPBlock 5 | serialized_name: ipBlock 6 | namespaceSelector: 7 | type: Kubernetes\Client\Model\LabelSelector 8 | serialized_name: namespaceSelector 9 | podSelector: 10 | type: Kubernetes\Client\Model\LabelSelector 11 | serialized_name: podSelector 12 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicyPort.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicyPort: 2 | properties: 3 | port: 4 | type: int 5 | protocol: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NetworkPolicy.NetworkPolicySpec.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NetworkPolicy\NetworkPolicySpec: 2 | properties: 3 | egress: 4 | type: array 5 | ingress: 6 | type: array 7 | podSelector: 8 | type: Kubernetes\Client\Model\LabelSelector 9 | serialized_name: podSelector 10 | policyTypes: 11 | type: array 12 | serialized_name: policyTypes 13 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Node.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Node: 2 | properties: 3 | metadata: 4 | type: Kubernetes\Client\Model\ObjectMetadata 5 | specification: 6 | type: Kubernetes\Client\Model\NodeSpecification 7 | serialized_name: spec 8 | status: 9 | type: Kubernetes\Client\Model\NodeStatus 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeAddress.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeAddress: 2 | properties: 3 | address: 4 | type: string 5 | type: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeCondition.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeCondition: 2 | properties: 3 | lastHeartbeatTime: 4 | type: DateTime 5 | serialized_name: lastHeartbeatTime 6 | lastTransitionTime: 7 | type: DateTime 8 | serialized_name: lastTransitionTime 9 | message: 10 | type: string 11 | reason: 12 | type: string 13 | status: 14 | type: string 15 | type: 16 | type: string 17 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeSpecification: 2 | properties: 3 | externalId: 4 | type: string 5 | serialized_name: externalID 6 | podCidr: 7 | type: string 8 | serialized_name: podCIDR 9 | unschedulable: 10 | type: boolean 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeStatus: 2 | properties: 3 | addresses: 4 | type: array 5 | capacity: 6 | type: array 7 | phase: 8 | type: string 9 | conditions: 10 | type: array 11 | nodeInfo: 12 | type: Kubernetes\Client\Model\NodeSystemInfo 13 | serialized_name: nodeInfo 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.NodeSystemInfo.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\NodeSystemInfo: 2 | properties: 3 | bootId: 4 | type: string 5 | serialized_name: bootID 6 | containerRuntimeVersion: 7 | type: string 8 | serialized_name: containerRuntimeVersion 9 | kernelVersion: 10 | type: string 11 | serialized_name: kernelVersion 12 | kubeProxyVersion: 13 | type: string 14 | serialized_name: kubeProxyVersion 15 | kubeletVersion: 16 | type: string 17 | serialized_name: kubeletVersion 18 | machineId: 19 | type: string 20 | serialized_name: machineID 21 | osImage: 22 | type: string 23 | serialized_name: osImage 24 | systemUUID: 25 | type: string 26 | serialized_name: systemUUID 27 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ObjectMetadata.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ObjectMetadata: 2 | properties: 3 | name: 4 | type: string 5 | creationTimestamp: 6 | type: string 7 | groups: [ read ] 8 | serialized_name: creationTimestamp 9 | deletionTimestamp: 10 | type: string 11 | groups: [ read ] 12 | serialized_name: deletionTimestamp 13 | deletionGracePeriodSeconds: 14 | type: integer 15 | serialized_name: deletionGracePeriodSeconds 16 | resourceVersion: 17 | type: string 18 | serialized_name: resourceVersion 19 | groups: [ read ] 20 | uid: 21 | type: string 22 | groups: [ read ] 23 | labelList: 24 | type: array 25 | serialized_name: labels 26 | access_type: public_method 27 | accessor: 28 | getter: getLabelsAsAssociativeArray 29 | setter: setLabelsFromAssociativeArray 30 | annotationList: 31 | type: array 32 | serialized_name: annotations 33 | access_type: public_method 34 | accessor: 35 | getter: getAnnotationsAsAssociativeArray 36 | setter: setAnnotationsFromAssociativeArray 37 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ObjectReference.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ObjectReference: 2 | properties: 3 | kind: 4 | type: string 5 | namespace: 6 | type: string 7 | uid: 8 | type: string 9 | apiVersion: 10 | type: string 11 | serialized_name: apiVersion 12 | resourceVersion: 13 | type: string 14 | serialized_name: resourceVersion 15 | fieldPath: 16 | type: string 17 | serialized_name: fieldPath 18 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PersistentVolumeClaim.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PersistentVolumeClaim: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\PersistentVolumeClaimSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\PersistentVolumeClaimStatus 14 | groups: [view] 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PersistentVolumeClaimSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PersistentVolumeClaimSpecification: 2 | properties: 3 | accessModes: 4 | type: array 5 | serialized_name: accessModes 6 | resources: 7 | type: Kubernetes\Client\Model\ResourceRequirements 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PersistentVolumeClaimStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PersistentVolumeClaimStatus: 2 | properties: 3 | phase: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Pod.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Pod: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\PodSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\PodStatus 14 | groups: [view] 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodMetadata.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodMetadata: 2 | properties: 3 | name: 4 | type: string 5 | labels: 6 | type: array 7 | access_type: public_method 8 | accessor: 9 | getter: getLabelsAsAssociativeArray 10 | setter: setLabelsFromAssociativeArray 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodSelector.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodSelector: 2 | properties: 3 | matchLabels: 4 | type: array 5 | serialized_name: matchLabels 6 | matchExpressions: 7 | type: array 8 | serialized_name: matchExpressions 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodSelectorRequirement.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodSelectorRequirement: 2 | properties: 3 | key: 4 | type: string 5 | operator: 6 | type: string 7 | values: 8 | type: array 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodSpecification: 2 | properties: 3 | containers: 4 | type: array 5 | restartPolicy: 6 | type: string 7 | serialized_name: restartPolicy 8 | dnsPolicy: 9 | type: string 10 | serialized_name: dnsPolicy 11 | volumes: 12 | type: array 13 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodStatus: 2 | properties: 3 | phase: 4 | type: string 5 | conditions: 6 | type: array 7 | serialized_name: Condition 8 | hostIp: 9 | type: string 10 | serialized_name: hostIP 11 | podIp: 12 | type: string 13 | serialized_name: podIP 14 | containerStatuses: 15 | type: array 16 | serialized_name: containerStatuses 17 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodStatusCondition.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodStatusCondition: 2 | properties: 3 | type: 4 | type: string 5 | status: 6 | type: boolean 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.PodTemplateSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\PodTemplateSpecification: 2 | properties: 3 | metadata: 4 | type: Kubernetes\Client\Model\ObjectMetadata 5 | podSpecification: 6 | type: Kubernetes\Client\Model\PodSpecification 7 | serialized_name: spec 8 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Probe.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Probe: 2 | properties: 3 | exec: 4 | type: Kubernetes\Client\Model\ExecAction 5 | httpGet: 6 | type: Kubernetes\Client\Model\HttpGetAction 7 | serialized_name: httpGet 8 | tcpSocket: 9 | type: Kubernetes\Client\Model\TcpSocketAction 10 | serialized_name: tcpSocket 11 | initialDelaySeconds: 12 | type: integer 13 | serialized_name: initialDelaySeconds 14 | timeoutSeconds: 15 | type: integer 16 | serialized_name: timeoutSeconds 17 | periodSeconds: 18 | type: integer 19 | serialized_name: periodSeconds 20 | successThreshold: 21 | type: integer 22 | serialized_name: successThreshold 23 | failureThreshold: 24 | type: integer 25 | serialized_name: failureThreshold 26 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.ClusterRole.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\ClusterRole: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | rules: 10 | type: array 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.ClusterRoleBinding.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\ClusterRoleBinding: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | roleRef: 10 | type: Kubernetes\Client\Model\RBAC\RoleRef 11 | serialized_name: roleRef 12 | subjects: 13 | type: array 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.PolicyRule.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\PolicyRule: 2 | properties: 3 | apiGroups: 4 | type: array 5 | serialized_name: apiGroups 6 | resources: 7 | type: array 8 | verbs: 9 | type: array 10 | resourceNames: 11 | type: array 12 | serialized_name: resourceNames 13 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.Role.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\Role: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | rules: 10 | type: array 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.RoleBinding.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\RoleBinding: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | roleRef: 10 | type: Kubernetes\Client\Model\RBAC\RoleRef 11 | serialized_name: roleRef 12 | subjects: 13 | type: array 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.RoleRef.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\RoleRef: 2 | properties: 3 | apiGroup: 4 | type: string 5 | serialized_name: apiGroup 6 | kind: 7 | type: string 8 | name: 9 | type: string 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.RBAC.Subject.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\RBAC\Subject: 2 | properties: 3 | apiVersion: 4 | type: string 5 | serialized_name: apiVersion 6 | kind: 7 | type: string 8 | namespace: 9 | type: string 10 | name: 11 | type: string 12 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ReplicationController.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ReplicationController: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\ReplicationControllerSpecification 11 | serialized_name: spec 12 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ReplicationControllerList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ReplicationControllerList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ReplicationControllerSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ReplicationControllerSpecification: 2 | properties: 3 | replicas: 4 | type: integer 5 | selector: 6 | type: array 7 | podTemplateSpecification: 8 | type: Kubernetes\Client\Model\PodTemplateSpecification 9 | serialized_name: template 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ResourceLimits.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ResourceLimits: 2 | properties: 3 | memory: 4 | type: string 5 | cpu: 6 | type: string 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ResourceRequirements.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ResourceRequirements: 2 | properties: 3 | requests: 4 | type: Kubernetes\Client\Model\ResourceRequirementsRequests 5 | limits: 6 | type: Kubernetes\Client\Model\ResourceLimits 7 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ResourceRequirementsRequests.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ResourceRequirementsRequests: 2 | properties: 3 | storage: 4 | type: string 5 | memory: 6 | type: string 7 | cpu: 8 | type: string 9 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Secret.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Secret: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | data: 10 | type: array 11 | type: 12 | type: string 13 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.SecurityContext.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\SecurityContext: 2 | properties: 3 | privileged: 4 | type: boolean 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Service.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Service: 2 | virtual_properties: 3 | getKind: 4 | serialized_name: Kind 5 | type: string 6 | properties: 7 | metadata: 8 | type: Kubernetes\Client\Model\ObjectMetadata 9 | specification: 10 | type: Kubernetes\Client\Model\ServiceSpecification 11 | serialized_name: spec 12 | status: 13 | type: Kubernetes\Client\Model\ServiceStatus 14 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ServiceAccount.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ServiceAccount: 2 | properties: 3 | metadata: 4 | type: Kubernetes\Client\Model\ObjectMetadata 5 | secrets: 6 | type: array 7 | imagePullSecrets: 8 | type: array 9 | serialized_name: imagePullSecrets 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ServiceList.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ServiceList: 2 | properties: 3 | items: 4 | type: array 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ServicePort.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ServicePort: 2 | properties: 3 | name: 4 | type: string 5 | port: 6 | type: integer 7 | targetPort: 8 | type: integer 9 | serialized_name: targetPort 10 | protocol: 11 | type: string 12 | nodePort: 13 | type: integer 14 | serialized_name: nodePort 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ServiceSpecification.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ServiceSpecification: 2 | properties: 3 | selector: 4 | type: array 5 | clusterIp: 6 | type: string 7 | serialized_name: clusterIP 8 | ports: 9 | type: array 10 | type: 11 | type: string 12 | sessionAffinity: 13 | type: string 14 | serialized_name: sessionAffinity 15 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.ServiceStatus.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\ServiceStatus: 2 | properties: 3 | loadBalancer: 4 | type: Kubernetes\Client\Model\LoadBalancerStatus 5 | serialized_name: loadBalancer 6 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Status.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Status: 2 | properties: 3 | status: 4 | type: string 5 | message: 6 | type: string 7 | reason: 8 | type: string 9 | code: 10 | type: integer 11 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.TcpSocketAction.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\TcpSocketAction: 2 | properties: 3 | port: 4 | type: integer 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Volume.EmptyDirVolumeSource.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Volume\EmptyDirVolumeSource: 2 | properties: 3 | medium: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Volume.HostPathVolumeSource.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Volume\HostPathVolumeSource: 2 | properties: 3 | path: 4 | type: string 5 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Volume.NfsVolumeSource.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Volume\NfsVolumeSource: 2 | properties: 3 | server: 4 | type: string 5 | path: 6 | type: string 7 | readOnly: 8 | type: boolean 9 | serialized_name: readOnly 10 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Volume.PersistentVolumeClaimSource.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Volume\PersistentVolumeClaimSource: 2 | properties: 3 | claimName: 4 | type: string 5 | serialized_name: claimName 6 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.Volume.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\Volume: 2 | properties: 3 | name: 4 | type: string 5 | emptyDir: 6 | type: Kubernetes\Client\Model\Volume\EmptyDirVolumeSource 7 | serialized_name: emptyDir 8 | nfs: 9 | type: Kubernetes\Client\Model\Volume\NfsVolumeSource 10 | hostPath: 11 | type: Kubernetes\Client\Model\Volume\HostPathVolumeSource 12 | serialized_name: hostPath 13 | persistentVolumeClaim: 14 | type: Kubernetes\Client\Model\Volume\PersistentVolumeClaimSource 15 | serialized_name: persistentVolumeClaim 16 | -------------------------------------------------------------------------------- /src/Resources/serializer/Model.VolumeMount.yml: -------------------------------------------------------------------------------- 1 | Kubernetes\Client\Model\VolumeMount: 2 | properties: 3 | name: 4 | type: string 5 | mountPath: 6 | type: string 7 | serialized_name: mountPath 8 | readOnly: 9 | type: boolean 10 | serialized_name: readOnly 11 | -------------------------------------------------------------------------------- /src/Serializer/JmsSerializerAdapter.php: -------------------------------------------------------------------------------- 1 | serializer = $serializer; 22 | } 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | public function serialize($data, $format, array $context = array()) 28 | { 29 | $jmsContext = SerializationContext::create(); 30 | $jmsContext->setGroups(array_key_exists('groups', $context) ? $context['groups'] : ['Default']); 31 | 32 | return $this->serializer->serialize($data, $format, $jmsContext); 33 | } 34 | 35 | /** 36 | * {@inheritdoc} 37 | */ 38 | public function deserialize($data, $type, $format, array $context = array()) 39 | { 40 | return $this->serializer->deserialize($data, $type, $format); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/functions.php: -------------------------------------------------------------------------------- 1 | directory = $directory ?: __DIR__.'/fixtures'; 18 | } 19 | 20 | /** 21 | * @param string $method 22 | * @param string $path 23 | * @param string $body 24 | * @param array $options 25 | * 26 | * @return string 27 | */ 28 | public function getFilePath($method, $path, $body = null, array $options = []) 29 | { 30 | $identifier = $method.'_'.$path; 31 | 32 | if (!empty($body)) { 33 | $identifier .= '-'.md5($body); 34 | } 35 | 36 | return $this->directory.DIRECTORY_SEPARATOR.preg_replace('/[^_\-.a-z0-9]/i', '_', $identifier); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sroze/kubernetes-client/4280b483786e8199a0174a58c9eee00776009166/tests/Adapter/Http/fixtures/.gitkeep -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__apis_batch_v1_namespaces_pods-heaven_jobs_env-test-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"mounted","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/mounted","uid":"7944dac5-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5479","creationTimestamp":"2016-03-23T11:43:34Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-br7h0","secret":{"secretName":"default-token-br7h0"}}],"containers":[{"name":"mounted","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-br7h0","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__apis_batch_v1_namespaces_pods-heaven_jobs_my-job-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"mounted","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/mounted","uid":"7944dac5-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5479","creationTimestamp":"2016-03-23T11:43:34Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-br7h0","secret":{"secretName":"default-token-br7h0"}}],"containers":[{"name":"mounted","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-br7h0","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__apis_batch_v1beta_namespaces_pods-heaven_cronjobs_my-cron-job-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"CronJob","metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"schedule":"@hourly","jobTemplate":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-cron-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_foo-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"foo","selfLink":"/api/v1/namespaces/foo","uid":"10bbb7e1-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5647","creationTimestamp":"2016-03-23T11:47:48Z","deletionTimestamp":"2016-03-23T11:47:48Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_foo_services_plop-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Success","code":200} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_my-bar-namespace-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"my-bar-namespace","selfLink":"/api/v1/namespaces/my-bar-namespace","uid":"3ae35ecf-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5416","creationTimestamp":"2016-03-23T11:41:49Z","deletionTimestamp":"2016-03-23T11:41:49Z","labels":{"bar":"baz"}},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_my-baz-namespace-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"my-baz-namespace","selfLink":"/api/v1/namespaces/my-baz-namespace","uid":"3b09c767-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5422","creationTimestamp":"2016-03-23T11:41:49Z","deletionTimestamp":"2016-03-23T11:41:49Z","labels":{"bar":"baz"}},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_pods-heaven-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven","uid":"7c2956fc-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5517","creationTimestamp":"2016-03-23T11:43:39Z","deletionTimestamp":"2016-03-23T11:43:49Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/delete__namespaces_pods-heaven_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/my-pod","uid":"7c31ee31-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5497","creationTimestamp":"2016-03-23T11:43:39Z","deletionTimestamp":"2016-03-23T11:44:09Z","deletionGracePeriodSeconds":30},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"my-pod","image":"hello-world","resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"ip-172-20-0-221.eu-west-1.compute.internal","securityContext":{}},"status":{"phase":"Pending","conditions":[{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2016-03-23T11:43:39Z","reason":"ContainersNotReady","message":"containers with unready status: [my-pod]"}],"hostIP":"172.20.0.221","startTime":"2016-03-23T11:43:39Z","containerStatuses":[{"name":"my-pod","state":{"waiting":{"reason":"ContainerCreating","message":"Image: hello-world is ready, container is creating"}},"lastState":{},"ready":false,"restartCount":0,"image":"hello-world","imageID":""}]}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__apis_batch_v1_namespaces_pods-heaven_jobs_args-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"args","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"args","labels":{},"annotations":{}},"spec":{"containers":[{"name":"args","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"args":["--f","foo","--b","bar"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__apis_batch_v1_namespaces_pods-heaven_jobs_commanded-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"containers":[{"name":"commanded","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"command":["sh","-c","foo","--b","bar"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__apis_batch_v1_namespaces_pods-heaven_jobs_env-test-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"containers":[{"name":"env-test","image":"hello-world","imagePullPolicy":"Always","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__apis_batch_v1_namespaces_pods-heaven_jobs_my-job-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__apis_batch_v1beta_namespaces_pods-heaven_cronjobs_my-cron-job-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"CronJob","metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"schedule":"@hourly","jobTemplate":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-cron-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces","resourceVersion":"5405"},"items":[{"metadata":{"name":"default","selfLink":"/api/v1/namespaces/default","uid":"f6d7aa97-f0d4-11e5-b4f1-0224611c6641","resourceVersion":"6","creationTimestamp":"2016-03-23T08:55:16Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"foo","selfLink":"/api/v1/namespaces/foo","uid":"3a861735-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5402","creationTimestamp":"2016-03-23T11:41:48Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}},{"metadata":{"name":"kube-system","selfLink":"/api/v1/namespaces/kube-system","uid":"f8eaff21-f0d4-11e5-b4f1-0224611c6641","resourceVersion":"13","creationTimestamp":"2016-03-23T08:55:20Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"foo","selfLink":"/api/v1/namespaces/foo","uid":"3a861735-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5406","creationTimestamp":"2016-03-23T11:41:48Z","deletionTimestamp":"2016-03-23T11:41:49Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Terminating"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo_persistentvolumeclaims_my-claim-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-claim","namespace":"foo","selfLink":"/api/v1/namespaces/foo/persistentvolumeclaims/my-claim","uid":"79215885-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5476","creationTimestamp":"2016-03-23T11:43:33Z"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"5Gi"}}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo_pods_mounted-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"mounted","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/mounted","uid":"7944dac5-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5479","creationTimestamp":"2016-03-23T11:43:34Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-br7h0","secret":{"secretName":"default-token-br7h0"}}],"containers":[{"name":"mounted","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-br7h0","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/my-pod","uid":"1d4224b0-f0e4-11e5-9fd0-0224611c6641","resourceVersion":"3770","creationTimestamp":"2016-03-23T10:43:43Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-vpprk","secret":{"secretName":"default-token-vpprk"}}],"containers":[{"name":"foo","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-vpprk","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo_secrets_dockercfg-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Secret","apiVersion":"v1","metadata":{"name":"dockercfg","namespace":"foo","selfLink":"/api/v1/namespaces/foo/secrets/dockercfg","uid":"0d3bea96-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5622","creationTimestamp":"2016-03-23T11:47:42Z"},"data":{"foo":"YmFy"},"type":"Opaque"} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_foo_services_plop-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Service","apiVersion":"v1","metadata":{"name":"plop","namespace":"foo","selfLink":"/api/v1/namespaces/foo/services/plop","uid":"10eef4f4-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5644","creationTimestamp":"2016-03-23T11:47:48Z"},"spec":{"ports":[{"name":"web","protocol":"TCP","port":80,"targetPort":80}],"selector":{"boolean":"","select-with":"a-label"},"clusterIP":"10.0.231.170","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_labelSelector_bar_3Dbar-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces","resourceVersion":"5419"},"items":[]} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_labelSelector_bar_3Dbaz-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"NamespaceList","apiVersion":"v1","metadata":{"selfLink":"/api/v1/namespaces","resourceVersion":"5413"},"items":[{"metadata":{"name":"my-bar-namespace","selfLink":"/api/v1/namespaces/my-bar-namespace","uid":"3ae35ecf-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5412","creationTimestamp":"2016-03-23T11:41:49Z","labels":{"bar":"baz"}},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}}]} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_pods-heaven-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven","uid":"7c2956fc-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5490","creationTimestamp":"2016-03-23T11:43:39Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_pods-heaven_pods_commanded_log-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | hello 2 | step 3 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_pods-heaven_pods_env-test-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"env-test","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/env-test","uid":"7e3ab977-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5506","creationTimestamp":"2016-03-23T11:43:42Z","deletionTimestamp":"2016-03-23T11:44:12Z","deletionGracePeriodSeconds":30},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"env-test","image":"hello-world","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"ip-172-20-0-221.eu-west-1.compute.internal","securityContext":{}},"status":{"phase":"Pending","conditions":[{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2016-03-23T11:43:42Z","reason":"ContainersNotReady","message":"containers with unready status: [env-test]"}],"hostIP":"172.20.0.221","startTime":"2016-03-23T11:43:42Z","containerStatuses":[{"name":"env-test","state":{"waiting":{"reason":"ContainerCreating","message":"Image: hello-world is ready, container is creating"}},"lastState":{},"ready":false,"restartCount":0,"image":"hello-world","imageID":""}]}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/get__namespaces_pods-heaven_pods_my-pod-37a6259cc0c1dae299a7866489dff0bd: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/my-pod","uid":"7c31ee31-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5497","creationTimestamp":"2016-03-23T11:43:39Z","deletionTimestamp":"2016-03-23T11:44:09Z","deletionGracePeriodSeconds":30},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"my-pod","image":"hello-world","resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","nodeName":"ip-172-20-0-221.eu-west-1.compute.internal","securityContext":{}},"status":{"phase":"Pending","conditions":[{"type":"Ready","status":"False","lastProbeTime":null,"lastTransitionTime":"2016-03-23T11:43:39Z","reason":"ContainersNotReady","message":"containers with unready status: [my-pod]"}],"hostIP":"172.20.0.221","startTime":"2016-03-23T11:43:39Z","containerStatuses":[{"name":"my-pod","state":{"waiting":{"reason":"ContainerCreating","message":"Image: hello-world is ready, container is creating"}},"lastState":{},"ready":false,"restartCount":0,"image":"hello-world","imageID":""}]}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-370d445de76290e995de530ead39ca8f: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"args","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"args","labels":{},"annotations":{}},"spec":{"containers":[{"name":"args","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"args":["--f","foo","--b","bar"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-3e7bfe0b27962853868390ff50d74980: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"containers":[{"name":"env-test","image":"hello-world","imagePullPolicy":"Always","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-40988a4dc2a3954cab4782aa0537a39d: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"containers":[{"name":"commanded","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"command":["sh","-c","foo","--b","bar"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-7dd59d04f4e6435b990d397db16d5b66: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"containers":[{"name":"commanded","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"command":["sh","-c","echo hello; sleep 2; echo step;"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-9f4479f45904cce45fab9e01395f4db3: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"containers":[{"name":"commanded","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"command":["sh","-c","echo hello; sleep 2; echo step;"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-bcd08f9ea1ed23a953f53a1bcd750ebf: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"commanded","labels":{},"annotations":{}},"spec":{"containers":[{"name":"commanded","image":"busybox","imagePullPolicy":"IfNotPresent","env":[],"ports":[],"volumeMounts":[],"command":["sh","-c","echo hello; sleep 2; echo step;"]}],"volumes":[],"restartPolicy":"Never","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-c7a836bfa955182a7722d28d508ef8bb: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"containers":[{"name":"env-test","image":"hello-world","imagePullPolicy":"Always","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-c97b72917d6c5848c268efd4fc4c46d4: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"env-test","labels":{},"annotations":{}},"spec":{"containers":[{"name":"env-test","image":"hello-world","imagePullPolicy":"Always","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-d13a4d6e97097266841c7c1e324c71db: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-f0ab2724202c792d83b80364cea9cefc: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1_namespaces_pods-heaven_jobs-fe54ddd552a5584a22de345030fb00ae: -------------------------------------------------------------------------------- 1 | {"kind":"Job","metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__apis_batch_v1beta_namespaces_pods-heaven_cronjobs-654977d63f8af947861fbedd7cdcc5d7: -------------------------------------------------------------------------------- 1 | {"kind":"CronJob","metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"schedule":"@hourly","jobTemplate":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"template":{"metadata":{"name":"my-cron-job","labels":{},"annotations":{}},"spec":{"containers":[{"name":"my-cron-job","image":"hello-world","imagePullPolicy":"Always","env":[],"ports":[],"volumeMounts":[]}],"volumes":[],"restartPolicy":"Always","dnsPolicy":"ClusterFirst"}}}}}} -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces-0de5a63a3863d11ba04ce429dffb7ede: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"my-baz-namespace","selfLink":"/api/v1/namespaces/my-baz-namespace","uid":"3b09c767-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5418","creationTimestamp":"2016-03-23T11:41:49Z","labels":{"bar":"baz"}},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces-1190f25acf79c7136f97861869558da2: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven","uid":"7c2956fc-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5490","creationTimestamp":"2016-03-23T11:43:39Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces-2fdc588f73ab5c5ecdac8410564d8f03: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"my-bar-namespace","selfLink":"/api/v1/namespaces/my-bar-namespace","uid":"3ae35ecf-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5412","creationTimestamp":"2016-03-23T11:41:49Z","labels":{"bar":"baz"}},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces-d69a632a83d6460668c7c1bbe12ac20a: -------------------------------------------------------------------------------- 1 | {"kind":"Namespace","apiVersion":"v1","metadata":{"name":"foo","selfLink":"/api/v1/namespaces/foo","uid":"10bbb7e1-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5633","creationTimestamp":"2016-03-23T11:47:48Z"},"spec":{"finalizers":["kubernetes"]},"status":{"phase":"Active"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_persistentvolumeclaims-0cbe63132082ff8da27d3574a6e98c42: -------------------------------------------------------------------------------- 1 | {"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"foo","namespace":"foo","selfLink":"/api/v1/namespaces/foo/persistentvolumeclaims/foo","uid":"79405373-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5478","creationTimestamp":"2016-03-23T11:43:34Z"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"5Gi"}}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_persistentvolumeclaims-e238d65c5700858db20f2298bded9f37: -------------------------------------------------------------------------------- 1 | {"kind":"PersistentVolumeClaim","apiVersion":"v1","metadata":{"name":"my-claim","namespace":"foo","selfLink":"/api/v1/namespaces/foo/persistentvolumeclaims/my-claim","uid":"79215885-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5476","creationTimestamp":"2016-03-23T11:43:33Z"},"spec":{"accessModes":["ReadWriteMany"],"resources":{"requests":{"storage":"5Gi"}}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_pods-550af21a6847f7d8343268e52d5f2d69: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/my-pod","uid":"1d4224b0-f0e4-11e5-9fd0-0224611c6641","resourceVersion":"3770","creationTimestamp":"2016-03-23T10:43:43Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-vpprk","secret":{"secretName":"default-token-vpprk"}}],"containers":[{"name":"foo","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-vpprk","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_pods-c4d76287d80bf59bf20e1f393a2a4d41: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"mounted","namespace":"foo","selfLink":"/api/v1/namespaces/foo/pods/mounted","uid":"7944dac5-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5479","creationTimestamp":"2016-03-23T11:43:34Z"},"spec":{"volumes":[{"name":"foo","persistentVolumeClaim":{"claimName":"foo"}},{"name":"default-token-br7h0","secret":{"secretName":"default-token-br7h0"}}],"containers":[{"name":"mounted","image":"busybox","resources":{},"volumeMounts":[{"name":"foo","mountPath":"/foo"},{"name":"default-token-br7h0","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_secrets-139e2563c0e1fc9a6b8646396d17820b: -------------------------------------------------------------------------------- 1 | {"kind":"Secret","apiVersion":"v1","metadata":{"name":"dockercfg","namespace":"foo","selfLink":"/api/v1/namespaces/foo/secrets/dockercfg","uid":"0d3bea96-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5622","creationTimestamp":"2016-03-23T11:47:42Z"},"data":{"foo":"YmFy"},"type":"Opaque"} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_services-aa6f72f87fa51a7578a2f059cee09047: -------------------------------------------------------------------------------- 1 | {"kind":"Service","apiVersion":"v1","metadata":{"name":"plop","namespace":"foo","selfLink":"/api/v1/namespaces/foo/services/plop","uid":"10eef4f4-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5644","creationTimestamp":"2016-03-23T11:47:48Z"},"spec":{"ports":[{"name":"web","protocol":"TCP","port":80,"targetPort":80}],"selector":{"boolean":"","select-with":"a-label"},"clusterIP":"10.0.231.170","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_foo_services-e9632726705c33941384874f3936719f: -------------------------------------------------------------------------------- 1 | {"kind":"Service","apiVersion":"v1","metadata":{"name":"plop","namespace":"foo","selfLink":"/api/v1/namespaces/foo/services/plop","uid":"10c43bfb-f0ed-11e5-9fd0-0224611c6641","resourceVersion":"5638","creationTimestamp":"2016-03-23T11:47:48Z"},"spec":{"ports":[{"name":"web","protocol":"TCP","port":80,"targetPort":80}],"selector":{"select-with":"a-label"},"clusterIP":"10.0.24.129","type":"ClusterIP","sessionAffinity":"None"},"status":{"loadBalancer":{}}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-5a951a46513ff53762d84c0be35fc7a9: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/my-pod","uid":"992127f1-f0ea-11e5-9fd0-0224611c6641","resourceVersion":"5042","creationTimestamp":"2016-03-23T11:30:08Z"},"spec":{"volumes":[{"name":"default-token-hauyl","secret":{"secretName":"default-token-hauyl"}}],"containers":[{"name":"env-test","image":"hello-world","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"resources":{},"volumeMounts":[{"name":"default-token-hauyl","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-83e76354fe2b7b2d6f4232bbc47e48d3: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"commanded","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/commanded","uid":"804542f0-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5511","creationTimestamp":"2016-03-23T11:43:45Z"},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"commanded","image":"busybox","command":["sh","-c","echo hello; sleep 2; echo step;"],"resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-cc27df5be77cbefdbe2608a387f4ba58: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"env-test","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/env-test","uid":"7e3ab977-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5503","creationTimestamp":"2016-03-23T11:43:42Z"},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"env-test","image":"hello-world","env":[{"name":"foo","value":"bar"},{"name":"baz","value":"foo"}],"resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-cd14804fd1c2b609ee50d2cebf2b6ba9: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"commanded","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/commanded","uid":"b3e44381-f0ea-11e5-9fd0-0224611c6641","resourceVersion":"5099","creationTimestamp":"2016-03-23T11:30:53Z"},"spec":{"volumes":[{"name":"default-token-xle92","secret":{"secretName":"default-token-xle92"}}],"containers":[{"name":"commanded","image":"busybox","command":["sh","-c","echo hello; sleep 2; echo step; sleep 2"],"resources":{},"volumeMounts":[{"name":"default-token-xle92","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-d83c48e407a658c2717269235f203fa1: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/my-pod","uid":"9a940fbe-f0ea-11e5-9fd0-0224611c6641","resourceVersion":"5050","creationTimestamp":"2016-03-23T11:30:11Z"},"spec":{"volumes":[{"name":"default-token-hauyl","secret":{"secretName":"default-token-hauyl"}}],"containers":[{"name":"commanded","image":"busybox","command":["sh","-c","echo hello; sleep 2; echo step; sleep 2"],"resources":{},"volumeMounts":[{"name":"default-token-hauyl","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"IfNotPresent"}],"restartPolicy":"Never","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | -------------------------------------------------------------------------------- /tests/Adapter/Http/fixtures/post__namespaces_pods-heaven_pods-e70a698b5e57e13e058c16c175cdbc9f: -------------------------------------------------------------------------------- 1 | {"kind":"Pod","apiVersion":"v1","metadata":{"name":"my-pod","namespace":"pods-heaven","selfLink":"/api/v1/namespaces/pods-heaven/pods/my-pod","uid":"7c31ee31-f0ec-11e5-9fd0-0224611c6641","resourceVersion":"5494","creationTimestamp":"2016-03-23T11:43:39Z"},"spec":{"volumes":[{"name":"default-token-ih536","secret":{"secretName":"default-token-ih536"}}],"containers":[{"name":"my-pod","image":"hello-world","resources":{},"volumeMounts":[{"name":"default-token-ih536","readOnly":true,"mountPath":"/var/run/secrets/kubernetes.io/serviceaccount"}],"terminationMessagePath":"/dev/termination-log","imagePullPolicy":"Always"}],"restartPolicy":"Always","terminationGracePeriodSeconds":30,"dnsPolicy":"ClusterFirst","serviceAccountName":"default","serviceAccount":"default","securityContext":{}},"status":{"phase":"Pending"}} 2 | --------------------------------------------------------------------------------