cwielenb/CNCF-Dataset huggingface dataset:
Project: KubeDB by AppsCode (App Definition and Development / Database)
File: kubectl-dba_connect_mongodb.md

title: Kubectl-Dba Connect Mongodb menu: docs_{{ .version }}: identifier: kubectl-dba-connect-mongodb name: Kubectl-Dba Connect Mongodb parent: reference-cli menuname: docs{{ .version }} sectionmenuid: reference Connect to a mongodb object Use this cmd to exec into a mongodb object's primary pod. example: kubectl dba connect mg <db-name> -n <db-namespace> ``` kubectl-dba connect mongodb [flags] ``` ``` -h, --help help for mongodb ``` ``` --as string Username to impersonate for the operation. User could be a regular user or a service account in a namespace. --as-group stringArray Group to impersonate for the operation, this flag can be repeated to specify multiple groups. --as-uid string UID to impersonate for the operation. --cache-dir string Default cache directory (default "/home/runner/.kube/cache") --certificate-authority string Path to a cert file for the certificate authority --client-certificate string Path to a client certificate file for TLS --client-key string Path to a client key file for TLS --cluster string The name of the kubeconfig cluster to use --context string The name of the kubeconfig context to use --default-seccomp-profile-type string Default seccomp profile --disable-compression If true, opt-out of response compression for all requests to the server --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to the kubeconfig file to use for CLI requests. --match-server-version Require server version to match client version -n, --namespace string If present, the namespace scope for this CLI request --password string Password for basic authentication to the API server --request-timeout string The length of time to wait before giving up on a single server request. Non-zero values should contain a corresponding time unit (e.g. 1s, 2m, 3h). A value of zero means don't timeout requests. (default "0") -s, --server string The address and port of the Kubernetes API server --tls-server-name string Server name to use for server certificate validation. If it is not provided, the hostname used to contact the server is used --token string Bearer token for authentication to the API server --user string The name of the kubeconfig user to use --username string Username for basic authentication to the API server ``` - Connect to a database.
Project: Kui (App Definition and Development / Application Definition & Image Build)
File: crud-operations.md

title: Kubernetes &mdash; CRUD Operations layout: 1: left Kubernetes objects can be created, updated, and deleted by storing multiple object configuration files in a directory and using `kubectl apply` to recursively create and update those objects as needed. This method retains writes made to live objects without merging the changes back into the object configuration files. It is good practice to experiment in a separate namespace. Thus, we first create a scratch namespace. ```bash validate: k get ns kui-notebook-1 cleanup: k delete ns kui-notebook-1 k create ns kui-notebook-1 ``` Now we can use `kubectl apply` to create a deployment in the `kui-notebook-1` namespace. ```bash validate: k get deploy myapp -n kui-notebook-1 cleanup: k delete -f https://raw.githubusercontent.com/kubernetes-sigs/kui/master/plugins/plugin-kubectl/tests/data/k8s/deployment.yaml -n kui-notebook-1 k apply -f https://raw.githubusercontent.com/kubernetes-sigs/kui/master/plugins/plugin-kubectl/tests/data/k8s/deployment.yaml -n kui-notebook-1 ``` When running this yourself, the `apply` table will be live, with the Status cells updating as resources become available. You may also click to expand the source reference. To inspect the `nginx-deployment` you just applied, you can click the resource name in the table above. Kui will then execute the command-line `kubectl get Deployment.v1.apps -n kui-notebook-1 nginx-deployment -o yaml` , so you can further inspect this deployment by a variety of resources, such as brief summary, last applied info, and a full yaml content. You can also use the following view to explore the related resources and involved events of this deployment. ```bash k get Deployment.v1.apps -n kui-notebook-1 myapp -o yaml ``` The above drilldown view shows a set of views over the Deployment, such as a brief summary of the resource, the configuration as of the previous call to `apply`, and the raw yaml code. You can also explore related resources, such as the Pods managed by the Deployment, or Kubernetes events that pertain to the Deployment. Clicking the edit icon allows you to modify and apply updates directly from that view. Clicking the delete icon will, with your confirmation, process a `kubectl delete` against that resource.
Project: KICS (Provisioning / Security & Compliance)
File: 0a994e04-c6dc-471d-817e-d37451d18a3b.md

title: Serverless API Access Logging Setting Undefined hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 0a994e04-c6dc-471d-817e-d37451d18a3b Query name: Serverless API Access Logging Setting Undefined Platform: CloudFormation Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: AWS Serverless API/AWS Serverless HTTP API should have Access Logging Setting(s) defined<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="7" AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: AWS SAM template with a simple API definition Resources: ApiGatewayApi: Type: AWS::Serverless::Api Properties: StageName: prod TracingEnabled: true CacheClusterEnabled: true ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="7" AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: AWS SAM template with a simple API definition Resources: HttpApi: Type: AWS::Serverless::HttpApi Properties: StageName: !Ref StageName Tags: Tag: Value ``` ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: AWS SAM template with a simple API definition Resources: ApiGatewayApi2: Type: AWS::Serverless::Api Properties: StageName: prod TracingEnabled: true CacheClusterEnabled: true AccessLogSetting: DestinationArn: 'arn:aws:logs:us-east-1:123456789:log-group:my-log-group' Format: >- {"requestId":"$context.requestId", "ip": "$context.identity.sourceIp", "caller":"$context.identity.caller", "user":"$context.identity.user","requestTime":"$context.requestTime", "eventType":"$context.eventType","routeKey":"$context.routeKey", "status":"$context.status","connectionId":"$context.connectionId"} ``` ```yaml title="Negative test num. 2 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Transform: AWS::Serverless-2016-10-31 Description: AWS SAM template with a simple API definition Resources: HttpApi2: Type: AWS::Serverless::HttpApi Properties: StageName: !Ref StageName Tags: Tag: Value AccessLogSettings: DestinationArn: 'arn:aws:logs:us-east-1:123456789:log-group:my-log-group' Format: >- {"requestId":"$context.requestId", "ip": "$context.identity.sourceIp", "caller":"$context.identity.caller", "user":"$context.identity.user","requestTime":"$context.requestTime", "eventType":"$context.eventType","routeKey":"$context.routeKey", "status":"$context.status","connectionId":"$context.connectionId"} ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: combinewithcontext.md

title: "CombineWithContext" <!-- Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> See for updates.
Project: kube-hunter (Provisioning / Security & Compliance)
File: KHV053.md

vid: KHV053 title: AWS Metadata Exposure categories: [Information Disclosure] severity: high AWS EC2 provides an internal HTTP endpoint that exposes information from the cloud platform to workloads running in an instance. The endpoint is accessible to every workload running in the instance. An attacker that is able to execute a pod in the cluster may be able to query the metadata service and discover additional information about the environment. Limit access to the instance metadata service. Consider using a local firewall such as `iptables` to disable access from some or all processes/users to the instance metadata service. Disable the metadata service (via instance metadata options or IAM), or at a minimum enforce the use IMDSv2 on an instance to require token-based access to the service. Modify the HTTP PUT response hop limit on the instance to 1. This will only allow access to the service from the instance itself rather than from within a pod.
Project: Open Policy Agent (OPA) (Provisioning / Security & Compliance)
File: raygun.md

title: raygun subtitle: Black-box Automated Testing for Rego labels: category: tooling layer: shell inventors: paclabsnet code: https://github.com/paclabsnet/raygun tutorials: https://github.com/paclabsnet/raygun/blob/main/README.md blogs: https://paclabs.substack.com/p/raygun-automated-testing-for-rego docs_features: policy-testing: note: | makes it easier to test Rego code in a "real-world" facsimile. A command-line tool for "black-box" automated testing of Rego. Raygun uses OPA as a client, instead of as the test driver. You create YAML test suites that specify the location of the bundle, the policy path, the input JSON and the expected response, and Raygun starts up an OPA process with that bundle, POSTs the input JSON to OPA, checks substrings of the response against your expectations and reports on the results. Easy to integrate into existing build chains. Keeps the tests separate from the policy source code.
Project: JReleaser (App Definition and Development / Application Definition & Image Build)
File: feature_request.md

name: Feature request about: Suggest an idea for this project title: '' labels: 'enhancement' assignees: '' Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Describe the solution you'd like A clear and concise description of what you want to happen. Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Additional context Add any other context or screenshots about the feature request here.
Project: YDB (App Definition and Development / Database)
File: charts.md

To view charts, use Grafana. The main metrics of the system are displayed on the dashboard: CPU Usage*: The total CPU utilization on all nodes (1&nbsp;000&nbsp;000 = 1 CPU). Memory Usage*: RAM utilization by nodes. Disk Space Usage*: Disk space utilization by nodes. SelfPing*: The highest actual delivery time of deferred messages in the actor system over the measurement interval. Measured for messages with a 10 ms delivery delay. If this value grows, it might indicate microbursts of workload, high CPU utilization, or displacement of the {{ ydb-short-name }} process from CPU cores by other processes.
Project: DevSpace (App Definition and Development / Application Definition & Image Build)
File: rest_docs.md

Generating ReST pages from a cobra command is incredibly easy. An example is as follows: ```go package main import ( "log" "github.com/spf13/cobra" "github.com/spf13/cobra/doc" ) func main() { cmd := &cobra.Command{ Use: "test", Short: "my test program", } err := doc.GenReSTTree(cmd, "/tmp") if err != nil { log.Fatal(err) } } ``` That will get you a ReST document `/tmp/test.rst` This program can actually generate docs for the kubectl command in the kubernetes project ```go package main import ( "log" "io/ioutil" "os" "k8s.io/kubernetes/pkg/kubectl/cmd" cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util" "github.com/spf13/cobra/doc" ) func main() { kubectl := cmd.NewKubectlCommand(cmdutil.NewFactory(nil), os.Stdin, ioutil.Discard, ioutil.Discard) err := doc.GenReSTTree(kubectl, "./") if err != nil { log.Fatal(err) } } ``` This will generate a whole series of files, one for each command in the tree, in the directory specified (in this case "./") You may wish to have more control over the output, or only generate for a single command, instead of the entire command tree. If this is the case you may prefer to `GenReST` instead of `GenReSTTree` ```go out := new(bytes.Buffer) err := doc.GenReST(cmd, out) if err != nil { log.Fatal(err) } ``` This will write the ReST doc for ONLY "cmd" into the out, buffer. Both `GenReST` and `GenReSTTree` have alternate versions with callbacks to get some control of the output: ```go func GenReSTTreeCustom(cmd *Command, dir string, filePrepender func(string) string, linkHandler func(string, string) string) error { //... } ``` ```go func GenReSTCustom(cmd Command, out bytes.Buffer, linkHandler func(string, string) string) error { //... } ``` The `filePrepender` will prepend the return value given the full filepath to the rendered ReST file. A common use case is to add front matter to use the generated documentation with : ```go const fmTemplate = ` date: %s title: "%s" slug: %s url: %s ` filePrepender := func(filename string) string { now := time.Now().Format(time.RFC3339) name := filepath.Base(filename) base := strings.TrimSuffix(name, path.Ext(name)) url := "/commands/" + strings.ToLower(base) + "/" return fmt.Sprintf(fmTemplate, now, strings.Replace(base, "_", " ", -1), base, url) } ``` The `linkHandler` can be used to customize the rendered links to the commands, given a command name and reference. This is useful while converting rst to html or while generating documentation with tools like Sphinx where `:ref:` is used: ```go // Sphinx cross-referencing format linkHandler := func(name, ref string) string { return fmt.Sprintf(":ref:`%s <%s>`", name, ref) } ```
Project: ClickHouse (App Definition and Development / Database)
File: github-events.md

slug: /en/getting-started/example-datasets/github-events sidebar_label: GitHub Events title: "GitHub Events Dataset" Dataset contains all events on GitHub from 2011 to Dec 6 2020, the size is 3.1 billion records. Download size is 75 GB and it will require up to 200 GB space on disk if stored in a table with lz4 compression. Full dataset description, insights, download instruction and interactive queries are posted .
Project: Checkov (Provisioning / Security & Compliance)
File: Sharing Custom Policies.md

layout: default published: true title: Sharing Custom Policies nav_order: 5 can be reused across multiple projects. You can download a git repository containing custom checks: ```python checkov --external-checks-git https://github.com/bridgecrewio/checkov.git ``` If you want to download only a specific subdirectory from a GitHub repository, you can specify a subdirectory after a double-slash` //`. Checkov will first download the URL specified before the double-slash (as if you didnt specify a double-slash), but will then copy the path after the double slash into a temporal directory. ```text checkov --external-checks-git https://github.com/bridgecrewio/checkov.git//tests/terraform/checks/resource/registry/exampleexternaldir/extra_checks ``` For example, if youre downloading this GitHub repository, but you only want to download the extra_checks directory, you can do the following: `https://github.com/bridgecrewio/checkov.git//extra_checks`
Project: MongoDB (App Definition and Development / Database)
File: thread_pools.md

A thread pool () accepts and executes lightweight work items called "tasks", using a carefully managed group of dedicated long-running worker threads. The worker threads perform the work items in parallel without forcing each work item to assume the burden of starting and destroying a dedicated thead. The abstract interface is an extension of the `OutOfLineExecutor` (see [the executors architecture guide][executors]) abstract interface, adding `startup`, `shutdown`, and `join` virtual member functions. It is the base class for our thread pool classes. is the most basic concrete thread pool. The number of worker threads is adaptive, but configurable with a min/max range. Idle worker threads are reaped (down to the configured min), while new worker threads can be created when needed (up to the configured max). is not a thread pool, but rather a `TaskExecutor` that uses a `ThreadPoolInterface` and a `NetworkInterface` to execute scheduled tasks. It's configured with a `ThreadPoolInterface` over which it takes ownership, and a `NetworkInterface`, of which it shares ownership. With these resources it implements the elaborate `TaskExecutor` interface (see [executors]). is a thread pool implementation that doesn't actually own any worker threads. It runs its tasks on the background thread of a . Incoming tasks that are scheduled from the `NetworkInterface`'s thread are run immediately. Otherwise they are queued to be run by the `NetworkInterface` thread when it is available. is a `ThreadPoolInterface`. It is not a mock of a `ThreadPool`. It has no configurable stored responses. It has one worker thread and a pointer to a `NetworkInterfaceMock`, and with these resources it simulates a thread pool well enough to be used by a `ThreadPoolTaskExecutor` in unit tests.
Project: Pinniped (Provisioning / Key Management)
File: ROADMAP.md

This document provides a high-level overview of the next big features the maintainers are planning to work on. This should serve as a reference point for Pinniped users and contributors to understand where the project is heading, and help determine if a contribution could be conflicting with a longer term plan. Discussion on the roadmap is welcomed. If you want to provide suggestions, use cases, and feedback to an item in the roadmap, please reach out to the maintainers using one of the methods described in the project's . to Pinniped are also welcomed. One of the most important aspects in any open source community is the concept of proposals. Large changes to the codebase and / or new features should be preceded by a in our repo. For smaller enhancements, you can open an issue to track that initiative or feature request. We work with and rely on community feedback to focus our efforts to improve Pinniped and maintain a healthy roadmap. Priorities and requirements change based on community feedback, roadblocks encountered, community contributions, etc. If you depend on a specific item, we encourage you to reach out for updated status information, or help us deliver that feature by to Pinniped.
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-qry-select-distribute-by.md

layout: global title: DISTRIBUTE BY Clause displayTitle: DISTRIBUTE BY Clause license: | Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The `DISTRIBUTE BY` clause is used to repartition the data based on the input expressions. Unlike the clause, this does not sort the data within each partition. ```sql DISTRIBUTE BY { expression [ , ... ] } ``` expression* Specifies combination of one or more values, operators and SQL functions that results in a value. ```sql CREATE TABLE person (name STRING, age INT); INSERT INTO person VALUES ('Zen Hui', 25), ('Anil B', 18), ('Shone S', 16), ('Mike A', 25), ('John A', 18), ('Jack N', 16); -- Reduce the number of shuffle partitions to 2 to illustrate the behavior of `DISTRIBUTE BY`. -- It's easier to see the clustering and sorting behavior with less number of partitions. SET spark.sql.shuffle.partitions = 2; -- Select the rows with no ordering. Please note that without any sort directive, the result -- of the query is not deterministic. It's included here to just contrast it with the -- behavior of `DISTRIBUTE BY`. The query below produces rows where age columns are not -- clustered together. SELECT age, name FROM person; ++-+ |age| name| ++-+ | 16|Shone S| | 25|Zen Hui| | 16| Jack N| | 25| Mike A| | 18| John A| | 18| Anil B| ++-+ -- Produces rows clustered by age. Persons with same age are clustered together. -- Unlike `CLUSTER BY` clause, the rows are not sorted within a partition. SELECT age, name FROM person DISTRIBUTE BY age; ++-+ |age| name| ++-+ | 25|Zen Hui| | 25| Mike A| | 18| John A| | 18| Anil B| | 16|Shone S| | 16| Jack N| ++-+ ```
Project: Meshery (Provisioning / Automation & Configuration)
File: meshery-ui_feature.md

name: Meshery UI Feature Request about: Request an enhancement in Meshery's UI title: '[UI]' labels: component/ui, language/javascript, framework/react, kind/enhancement assignees: '' <!-- A brief description of what the problem is. (e.g. I need to be able to...) --> <!-- A brief description of the enhancement. --> <!-- Specifics on the approach to fulfilling the feature request. --> <!-- Stipulations of functional behavior or non-functional items that must be in-place in order for the issue to be closed. --> <!-- Any visual diagrams of the desired user interface. --> Wireframes and in Figma Questions: and
Project: ArangoDB (App Definition and Development / Database)
File: symbol_visible.md

+++ title = "`BOOSTOUTCOMESYMBOL_VISIBLE`" description = "How to mark throwable types as always having default ELF symbol visibility." +++ Compiler-specific markup used to mark throwable types as always having default ELF symbol visibility, without which it will be impossible to catch throws of such types across shared library boundaries on ELF only. Overridable: Define before inclusion. Default:<dl> <dt>Standalone Outcome: <dd>To `attribute((visibility("default"))` on GCC and clang when targeting ELF, otherwise nothing. <dt>Boost.Outcome: <dd>To `BOOSTSYMBOLVISIBLE`. </dl> Header: `<boost/outcome/config.hpp>`
Project: KICS (Provisioning / Security & Compliance)
File: 4b801c38-ebb4-4c81-984b-1ba525d43adf.md

title: Nifcloud NAS Has Common Private Network hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 4b801c38-ebb4-4c81-984b-1ba525d43adf Query name: Nifcloud NAS Has Common Private Network Platform: Terraform Severity: <span style="color:#edd57e">Low</span> Category: Networking and Firewall URL: The nas has common private network<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "nifcloudnasinstance" "positive" { identifier = "nas001" allocated_storage = 100 protocol = "nfs" type = 0 networkid = "net-COMMONPRIVATE" } ``` ```tf title="Negative test num. 1 - tf file" resource "nifcloudnasinstance" "negative" { identifier = "nas001" allocated_storage = 100 protocol = "nfs" type = 0 networkid = nifcloudprivate_lan.main.id } ```