Skip to content

Commit

Permalink
Update docs headers and examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Subhajit97 committed Sep 25, 2023
1 parent 5f5575e commit 65d1f7f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
4 changes: 2 additions & 2 deletions docs/tables/kubernetes_pod_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where
c -> 'securityContext' ->> 'privileged' = 'true';
```

### List pod templates with pod has access to the host process ID, IPC, or network namespace
### List pod templates with pod access to the host process ID, IPC, or network namespace

```sql
select
Expand Down Expand Up @@ -80,7 +80,7 @@ select
template;
```

### List pod templates with pod having a container with --profiling argument is set to false
### List pod templates that have a container with profiling argument set to false

```sql
select
Expand Down
12 changes: 4 additions & 8 deletions kubernetes/table_kubernetes_pod_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ type PodTemplate struct {

func listK8sPodTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
logger := plugin.Logger(ctx)
logger.Trace("listK8sPodTemplates")
logger.Debug("listK8sPodTemplates")

// Get the client for querying the K8s APIs for the provided context.
// If the connection is configured for the manifest files, the client will return nil.
Expand Down Expand Up @@ -111,12 +111,8 @@ func listK8sPodTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd
// Limiting the results
limit := d.QueryContext.Limit
if d.QueryContext.Limit != nil {
if *limit < input.Limit {
if *limit < 1 {
input.Limit = 1
} else {
input.Limit = *limit
}
if *limit < 500 {
input.Limit = *limit
}
}

Expand Down Expand Up @@ -155,7 +151,7 @@ func listK8sPodTemplates(ctx context.Context, d *plugin.QueryData, _ *plugin.Hyd

func getK8sPodTemplate(ctx context.Context, d *plugin.QueryData, _ *plugin.HydrateData) (interface{}, error) {
logger := plugin.Logger(ctx)
logger.Trace("getK8sPodTemplate")
logger.Debug("getK8sPodTemplate")

// Get the client for querying the K8s APIs for the provided context.
// If the connection is configured for the manifest files, the client will return nil.
Expand Down

0 comments on commit 65d1f7f

Please sign in to comment.