Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add 'kubectl' transport support for CLI client #1214

Open
dkliban opened this issue Aug 12, 2019 · 0 comments
Open

Add 'kubectl' transport support for CLI client #1214

dkliban opened this issue Aug 12, 2019 · 0 comments

Comments

@dkliban
Copy link
Member

dkliban commented Aug 12, 2019

pulp-smash currently supports two types of transports for the CLI client: local and ssh. When Pulp 3 is deployed using Kubernetes, neither the local nor the ssh transport can be used to execute commands inside the container. In these instances, 'kubectl' needs to be used to execute a command. The kubectl command needs to be executed locally in the following manner:

kubectl exec -it pulp-api-<pod-id> /some/command --with-argument

kubectl needs to be used to discover the pulp-api pod name. This should occur once when the CLI client is instantiated. This information is available by running the following:

$ kubectl get pods
NAME                                    READY   STATUS    RESTARTS   AGE
postgres-56bc7d8cf7-z7z27               1/1     Running   0          3h47m
pulp-api-54b6bb8599-vg4xq               1/1     Running   0          3h47m
pulp-content-6b4c4998cf-2bvnq           1/1     Running   0          3h47m
pulp-content-6b4c4998cf-p6gp8           1/1     Running   0          3h47m
pulp-operator-dfcd54ff9-5qh6j           2/2     Running   0          3h48m
pulp-resource-manager-fcb4668dd-8n5rp   1/1     Running   0          3h47m
pulp-worker-69d98df488-6dpxm            1/1     Running   0          3h47m
pulp-worker-69d98df488-74fsr            1/1     Running   0          3h47m
redis-59b564fc74-czvss                  1/1     Running   0          3h47m

pulp-smash users will be able to specify the following config to run tests against pulp 3 on kubernetes:

{
    "pulp": {
        "auth": ["admin", "admin"],
        "selinux enabled": false,
        "version": "3"
    },
    "hosts": [
        {
            "hostname": "localhost",
            "roles": {
                "api": {"port": 24817, "scheme": "http", "service": "nginx"},
                "content": {"port": 24816, "scheme": "http", "service": "pulp_content_app"},
                "pulp resource manager": {},
                "pulp workers": {},
                "redis": {},
                "shell": {"transport": "kubectl"}
            }
        }
    ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants