github.com/kubeshop/testkube@v1.17.23/contrib/executor/kubepug/README.md (about)

     1  ![Testkube Logo](https://raw.githubusercontent.com/kubeshop/testkube/main/assets/testkube-color-gray.png)
     2  
     3  # Welcome to Testkube kubepug Executor
     4  
     5  Testkube kubepug Executor is a [kubepug](https://github.com/kubepug/kubepug) executor running directly in your Kubernetes cluster via [Testkube](https://testkube.io).
     6  Its main function is to make sure your Kubernetes clusters are up to date, and using the latest APIs.
     7  
     8  This Executor is automatically installed together with Testkube, there is no need to build it or register it to your local environment.
     9  
    10  ## Example usages
    11  
    12  This Executor should be used to compare the [Kuberenetes API Swagger definitions](https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json) with existing manifests.
    13  
    14  ### Test manifests against latest Kubernetes version
    15  
    16  ```yaml
    17  apiVersion: v1
    18  conditions:
    19  - message: '{"health":"true"}'
    20    status: "True"
    21    type: Healthy
    22  kind: ComponentStatus
    23  metadata:
    24    creationTimestamp: null
    25    name: etcd-1
    26  ```
    27  
    28  ```bash
    29  $ kubectl testkube create test --file file_name.yaml --type kubepug/yaml --name kubepug-example-test-1
    30  Test created testkube / kubepug-example-test-1 🥇
    31  
    32  
    33  $ kubectl testkube run test kubepug-example-test-1
    34  Type          : kubepug/yaml
    35  Name          : kubepug-example-test-1
    36  Execution ID  : 62b59ae1657713ea1b003a25
    37  Execution name: completely-helped-fowl
    38  
    39  
    40  
    41  Test execution started
    42  
    43  Watch test execution until complete:
    44  $ kubectl testkube watch execution 62b59ae1657713ea1b003a25
    45  
    46  
    47  Use following command to get test execution details:
    48  $ kubectl testkube get execution 62b59ae1657713ea1b003a25
    49  
    50  
    51  $ kubectl testkube get execution 62b59ae1657713ea1b003a25
    52  ID:        62b59ae1657713ea1b003a25
    53  Name:      completely-helped-fowl
    54  Type:      kubepug/yaml
    55  Duration:  00:00:05
    56  
    57  Status test execution failed:
    58  
    59  ⨯
    60  {"DeprecatedAPIs":[{"Description":"ComponentStatus (and ComponentStatusList) holds the cluster validation info. Deprecated: This API is deprecated in v1.19+","Group":"","Kind":"ComponentStatus","Version":"v1","Name":"","Deprecated":true,"Items":[{"Scope":"OBJECT","ObjectName":"etcd-1","Namespace":"","location":"/tmp/test-content4075001618"}]}],"DeletedAPIs":null}
    61  ```
    62  
    63  ### Test manifests against previous Kubernetes version
    64  
    65  ```yaml
    66  apiVersion: v1
    67  conditions:
    68  - message: '{"health":"true"}'
    69    status: "True"
    70    type: Healthy
    71  kind: ComponentStatus
    72  metadata:
    73    creationTimestamp: null
    74    name: etcd-1
    75  ```
    76  
    77  ```bash
    78  $ kubectl testkube run test kubepug-example-test-1 --args '--k8s-version=v1.18.0'
    79  Type          : kubepug/yaml
    80  Name          : kubepug-example-test-1
    81  Execution ID  : 62b59d52657713ea1b003a2d
    82  Execution name: notably-healthy-cricket
    83  
    84  
    85  
    86  Test execution started
    87  
    88  Watch test execution until complete:
    89  $ kubectl testkube watch execution 62b59d52657713ea1b003a2d
    90  
    91  Use following command to get test execution details:
    92  $ kubectl testkube get execution 62b59d52657713ea1b003a2d
    93  
    94  
    95  $ kubectl testkube get execution 62b59d52657713ea1b003a2d
    96  ID:        62b59d52657713ea1b003a2d
    97  Name:      sincerely-real-marten
    98  Type:      kubepug/yaml
    99  Duration:  00:00:05
   100  Args:     --k8s-version=v1.18.0
   101  
   102  {"DeprecatedAPIs":null,"DeletedAPIs":null}
   103  Status Test execution completed with success 🥇
   104  ```
   105  
   106  # Known limitations 
   107  
   108  - large input files break it - at least when I tried to feed it the output of kubectl api-resources --verbs=list -o name | xargs -n 1 kubectl get --show-kind --ignore-not-found --all-namespaces -o json > all-namespaces-pug.json
   109  - helm-charts with template variables don’t work. It seems to be a limitation from kubepug, but that’s just a hunch
   110  
   111  # Issues and enchancements
   112  
   113  Please follow the main [TestKube repository](https://github.com/kubeshop/testkube) for reporting any [issues](https://github.com/kubeshop/testkube/issues) or [discussions](https://github.com/kubeshop/testkube/discussions)
   114  
   115  # Testkube
   116  
   117  For more info go to [main Testkube repo](https://github.com/kubeshop/testkube)
   118  
   119  ![Release](https://img.shields.io/github/v/release/kubeshop/testkube) [![Releases](https://img.shields.io/github/downloads/kubeshop/testkube/total.svg)](https://github.com/kubeshop/testkube/tags?label=Downloads) ![Go version](https://img.shields.io/github/go-mod/go-version/kubeshop/testkube)
   120  
   121  ![Docker builds](https://img.shields.io/docker/automated/kubeshop/testkube-api-server) ![Code build](https://img.shields.io/github/workflow/status/kubeshop/testkube/Code%20build%20and%20checks) ![Release date](https://img.shields.io/github/release-date/kubeshop/testkube)
   122  
   123  ![Twitter](https://img.shields.io/twitter/follow/thekubeshop?style=social) ![Slack](https://testkubeworkspace.slack.com/join/shared_invite/zt-2arhz5vmu-U2r3WZ69iPya5Fw0hMhRDg#/shared-invite/email)
   124  
   125  #### [Documentation](https://docs.testkube.io) | [Slack](https://testkubeworkspace.slack.com/join/shared_invite/zt-2arhz5vmu-U2r3WZ69iPya5Fw0hMhRDg#/shared-invite/email)