cwielenb/CNCF-Dataset huggingface dataset:
Project: KubeMQ (App Definition and Development / Streaming & Messaging)
File: kubemq_queues_ack.md

Queues ack all messages in a 'queues' channel Queues ack command allows to clear / remove / ack all messages in a 'queues' channel ``` kubemq queues ack [flags] ``` ``` kubemq queue ack some-channel kubemq queue ack some-long-queue -w 30 ``` ``` -h, --help help for ack -w, --wait int set how many seconds to wait for ack all messages (default 2) ``` - Execute Kubemq 'queues' commands
Project: Lagoon (App Definition and Development / Application Definition & Image Build)
File: tests.md

All of our tests are written with and mostly follow this approach: They create a new Git repository. Add and commit some files from a list of files \(in `tests/files`\) into this Git repository. Push this Git repository to a Git server \(either locally or on GitHub\). Send a trigger to a trigger service \(for example a webhook to the webhook handler, which is the same as a real webhook that would be sent\). Starts to monitor the URL at which the test would expect something to happen \(like deploying a Node.js app that has the Git branch as an HTML text\). Compares the result on the URL with the expected result. Lagoon is mostly tested in 3 different ways: During local development, the best way to test is locally. All tests are started via `make`. Make will download and build all the required dependencies. ```bash title="Make tests" make tests ``` This will run all defined tests. If you only want to run a subset of the tests, run `make tests-list` to see all existing tests and run them individually. For example, `make tests/node` will run the Node.js Docker images tests. In order to actually see what is happening inside the microservices, we can use `make logs`: ```bash title="Make logs" make logs ``` Or only for a specific service: ```bash title="Make logs" make logs service=webhook-handler ``` In order to test pull requests that are created against Lagoon, we have a fully automatic integration test running on a dedicated Jenkins instance: . It is defined inside the `.Jenkinsfile`, and runs automatically for every pull request that is opened. This will build all images, start a Kubernetes cluster and run a series of tests. The tests can be found here: <!-- markdown-link-check-disable --> <!-- markdown-link-check-enable -->
Project: KICS (Provisioning / Security & Compliance)
File: 599318f2-6653-4569-9e21-041d06c63a89.md

title: AKS Private Cluster Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 599318f2-6653-4569-9e21-041d06c63a89 Query name: AKS Private Cluster Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Insecure Configurations URL: Azure Kubernetes Service (AKS) API should not be exposed to the internet<br> ```tf title="Positive test num. 1 - tf file" hl_lines="7" resource "azurermkubernetescluster" "positive1" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" privateclusterenabled = false } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="1" resource "azurermkubernetescluster" "positive2" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" } ``` ```tf title="Negative test num. 1 - tf file" resource "azurermkubernetescluster" "negative" { name = "example-aks1" location = azurermresourcegroup.example.location resourcegroupname = azurermresourcegroup.example.name dns_prefix = "exampleaks1" privateclusterenabled = true } ```
Project: Pilosa (App Definition and Development / Database)
File: tracing.md

Pilosa client supports distributed tracing via the API. In order to use a tracer with Go-Pilosa, you should: Create the tracer, Pass the `OptClientOption(tracer)` to `NewClient`. In this document, we will be using the tracer, but OpenTracing has support for . Let's run a temporary Pilosa container: $ docker run -it --rm -p 10101:10101 pilosa/pilosa:v1.2.0 Check that you can access Pilosa: $ curl localhost:10101 Welcome. Pilosa is running. Visit https://www.pilosa.com/docs/ for more information. Let's run a Jaeger Server container: $ docker run -it --rm -p 5775:5775/udp -p 16686:16686 jaegertracing/all-in-one:latest ...<title>Jaeger UI</title>... The sample code depdends on the Jaeger Go client, so let's install it first: $ go get -u github.com/uber/jaeger-client-go/ Save the following sample code as `gopilosa-tracing.go`: ```go package main import ( "log" "time" "github.com/pilosa/pilosa/v2/client" "github.com/uber/jaeger-client-go" "github.com/uber/jaeger-client-go/config" ) func main() { // Create the tracer. cfg := config.Configuration{ Sampler: &config.SamplerConfig{ Type: "const", Param: 1, }, Reporter: &config.ReporterConfig{ LogSpans: true, BufferFlushInterval: 1 * time.Second, // Jaeger Server address LocalAgentHostPort: "127.0.0.1:5775", }, } tracer, closer, err := cfg.New( "gopilosatest", config.Logger(jaeger.StdLogger), ) // Don't forget to close the tracer. defer closer.Close() // Create the client, and pass the tracer. cli, err := client.NewClient(":10101", pilosa.OptClientTracer(tracer)) if err != nil { log.Fatal(err) } // Read the schema from the server. // This should create a trace on the Jaeger server. schema, err := cli.Schema() if err != nil { log.Fatal(err) } // Create and sync the sample schema. // This should create a trace on the Jaeger server. myIndex := schema.Index("my-index") myField := myIndex.Field("my-field") err = cli.SyncSchema(schema) if err != nil { log.Fatal(err) } // Run a query on Pilosa. // This should create a trace on the Jaeger server. _, err = cli.Query(myField.Set(1, 1000)) if err != nil { log.Fatal(err) } } ``` Run the sample code: $ go run gopilosa-tracing.go Open http://localhost:16686 in your web browser to visit Jaeger UI. Click on the Search tab and select `go_pilosa_test` in the Service* dropdown on the right. Click on Find Traces* button at the bottom left. You should see a couple of traces, such as: `Client.Query`, `Client.CreateField`, `Client.Schema`, etc.
Project: Fabric8 Kubernetes Client (App Definition and Development / Application Definition & Image Build)
File: MIGRATION-v7.md

[!NOTE] If you encounter any problems with the following "Migration from 6.x to 7.x" instructions, please let us know by creating an issue in our . We value your feedback and will work to address your issue promptly. Your contribution is essential to improving our documentation, making our migration process smoother for everyone!
Project: ClickHouse (App Definition and Development / Database)
File: v22.8.15.23-lts.md

sidebar_position: 1 sidebar_label: 2023 Backported in : - Apply `ALTER TABLE tablename ON CLUSTER cluster MOVE PARTITION|PART partitionexpr TO DISK|VOLUME 'disk_name'` to all replicas. Because `ALTER TABLE t MOVE` is not replicated. (). Backported in : Sometimes after changing a role that could be not reflected on the access rights of a user who uses that role. This PR fixes that. (). Backported in : - Fix incorrect alias recursion in QueryNormalizer. (). Backported in : - Fix arithmetic operations in aggregate optimization with `min` and `max`. (). Backported in : Fix result of LIKE predicates which translate to substring searches and contain quoted non-LIKE metacharacters. (). Backported in : Fix possible deadlock on distributed query cancellation. (). Reduce updates of Mergeable Check (). Update typing for a new PyGithub version (). Add a manual trigger for release workflow ().
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_resourcemanager_folders.md

+++ title = "googleresourcemanagerfolders resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googleresourcemanagerfolders" identifier = "inspec/resources/gcp/googleresourcemanagerfolders.md googleresourcemanagerfolders resource" parent = "inspec/resources/gcp" +++ A `googleresourcemanagerfolders` is used to test a Google Folder resource ```ruby describe.one do googleresourcemanagerfolders(parent: 'organizations/12345').displaynames.each do |displayname| describe display_name do it { should eq 'inspec-gcp-folder' } end end end ``` Properties that can be accessed from the `googleresourcemanagerfolders` resource: See the resource for more information. `names` : an array of `googleresourcemanagerfolder` name `lifecycle_states` : an array of `googleresourcemanagerfolder` lifecycle_state `create_times` : an array of `googleresourcemanagerfolder` create_time `parents` : an array of `googleresourcemanagerfolder` parent `display_names` : an array of `googleresourcemanagerfolder` display_name This resource supports all of the above properties as filter criteria, which can be used with `where` as a block or a method. Ensure the is enabled for the current project.
Project: KICS (Provisioning / Security & Compliance)
File: fd54f200-402c-4333-a5a4-36ef6709af2f.md

title: Missing User Instruction hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: fd54f200-402c-4333-a5a4-36ef6709af2f Query name: Missing User Instruction Platform: Dockerfile Severity: <span style="color:#bb2124">High</span> Category: Build Process URL: A user should be specified in the dockerfile, otherwise the image will run as root<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="1" FROM python:2.7 RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY --chown=patrick:patrick app /app WORKDIR /app CMD ["python", "app.py"] ``` ```dockerfile title="Positive test num. 2 - dockerfile file" hl_lines="7" FROM golang:1.16 AS builder WORKDIR /go/src/github.com/foo/href-counter/ RUN go get -d -v golang.org/x/net/html COPY app.go ./ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=builder /go/src/github.com/foo/href-counter/app ./ CMD ["./app"] ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM python:2.7 RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY --chown=patrick:patrick app /app WORKDIR /app USER patrick CMD ["python", "app.py"] FROM scratch RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY --chown=patrick:patrick app /app WORKDIR /app CMD ["python", "app.py"] ``` ```dockerfile title="Negative test num. 2 - dockerfile file" FROM golang:1.16 AS builder WORKDIR /go/src/github.com/foo/href-counter/ RUN go get -d -v golang.org/x/net/html COPY app.go ./ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ COPY --from=builder /go/src/github.com/foo/href-counter/app ./ CMD ["./app"] RUN useradd -ms /bin/bash patrick USER patrick ``` ```dockerfile title="Negative test num. 3 - dockerfile file" FROM python:2.7 RUN pip install Flask==0.11.1 RUN useradd -ms /bin/bash patrick COPY --chown=patrick:patrick app /app WORKDIR /app USER patrick CMD ["python", "app.py"] ```
Project: Cyclops (App Definition and Development / Application Definition & Image Build)
File: prerequisites.md

In order to test out Cyclops you are going to need some things. First thing you are going to need is a Kubernetes cluster. If you have one that you can use to play with, great, if not you can try installing . Minikube sets up a local Kubernetes cluster that you can use to test stuff out. Check the on how to install it. Another thing you will need is . It is a command line interface for running commands against your cluster. Once you have installed minikube and kubectl, run your local cluster with: ```bash minikube start ``` After some time you will have a running cluster that you can use for testing. To verify everything is in order, you can try fetching all namespaces from the cluster with: ```bash kubectl get namespaces ``` Output should be something like this: ``` NAME STATUS AGE default Active 10m kube-node-lease Active 10m kube-public Active 10m kube-system Active 10m ... ```
Project: KICS (Provisioning / Security & Compliance)
File: 22ef1d26-80f8-4a6c-8c15-f35aab3cac78.md

title: Google Compute Network Using Firewall Rule that Allows All Ports hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 22ef1d26-80f8-4a6c-8c15-f35aab3cac78 Query name: Google Compute Network Using Firewall Rule that Allows All Ports Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Google Compute Network should not use a firewall rule that allows all ports<br> ```tf title="Positive test num. 1 - tf file" hl_lines="17" resource "googlecomputefirewall" "positive1" { name = "test-firewall" network = googlecomputenetwork.positive1.name allow { protocol = "icmp" } allow { protocol = "tcp" ports = ["0-65535"] } source_tags = ["web"] } resource "googlecomputenetwork" "positive1" { name = "test-network" } ``` ```tf title="Negative test num. 1 - tf file" resource "googlecomputefirewall" "negative1" { name = "test-firewall" network = googlecomputenetwork.negative1.name allow { protocol = "icmp" } allow { protocol = "tcp" ports = ["80", "8080"] } source_tags = ["web"] } resource "googlecomputenetwork" "negative1" { name = "test-network" } ```
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.7.3-patch.2.md

layout: release date: 2023-12-21 tag: v0.7.3-patch.2 [Relationships] Add Environment Hierarchical Parent Relationship @theBeginner86 (#9677) Add Routing To Dashboard tabs @aabidsofi19 (#9687) [UI] fix kubernetes icon @aabidsofi19 (#9690) Add Routing To Dashboard tabs @aabidsofi19 (#9687) chore(deps): Bump github.com/containerd/containerd from 1.7.6 to 1.7.11 @dependabot (#9683) [bug] Fix support for exporting designs @theBeginner86 (#9692) [Docs] Update for each page's abstract @leecalcote (#9685) Thank you to our contributors for making this release possible: @aabidsofi19, @dependabot, @leecalcote and @theBeginner86
Project: Beam (App Definition and Development / Streaming & Messaging)
File: 47_resource_hints.md

Prompt: How to customize compute resources for an Apache Beam pipeline? Response: Resource hints allow pipeline authors to provide Apache Beam runners with additional information, suggesting desired compute resource requirements. Runners can apply such hints to configure the execution environment for specific transforms or the entire pipeline. Currently, Apache Beam supports two resource hints: `minram`: specifies the minimum amount of RAM to allocate to workers, expressed in MB, GB, MiB, or GiB (for example, `minram="4GB"`). This value serves as a lower limit when allocating memory to workers. `accelerator`: describes a hardware accelerator for processing a transform, such as specifying GPU type, count, and configuration options. Resource hints can be nested, allowing hints to be specified on sub-transforms (inner transforms) of a composite transform (parent transform). When applying hints, runners follow these rules: For `min_ram`, the largest value among a transform and its parent transforms is used. Example: if an inner transform sets `min_ram` to 16GB and the parent transform sets it to 8GB, the inner transform's value (16GB) is used for steps within the inner transform, and the parent transform's value (8GB) is used for steps outside the inner transform. If an inner transform sets min_ram to 16GB and the parent transform sets it to 32GB, a hint of 32GB is used for all steps in the entire transform. For `accelerator`, the innermost value takes precedence. Example: if an inner transform's accelerator hint differs from a parent transform's, the inner transform's hint is used. *Specify Resource Hints for a Pipeline:* In Apache Beam's Java SDK, you can specify hints via the `resourceHints` pipeline option. Example: ```java mvn compile exec:java -Dexec.mainClass=com.example.MyPipeline \ -Dexec.args="... \ --resourceHints=min_ram=<N>GB \ --resourceHints=accelerator='hint'" \ -Pdirect-runner ``` In the Python SDK, you can specify hints via the `resource_hints` pipeline option. Example: ```python python my_pipeline.py \ ... \ --resourcehints minram=<N>GB \ --resource_hints accelerator="hint" ``` *Specify Resource Hints for a Transform:* In Apache Beams Java SDK, you can specify resource hints programmatically on pipeline steps (transforms) using the `setResourceHints` method. Example: ```java pcoll.apply(MyCompositeTransform.of(...) .setResourceHints( ResourceHints.create() .withMinRam("15GB") .withAccelerator("type:nvidia-tesla-k80;count:1;install-nvidia-driver"))) pcoll.apply(ParDo.of(new BigMemFn()) .setResourceHints( ResourceHints.create().withMinRam("30GB"))) ``` In the Python SDK, you can specify resource hints programmatically on pipeline steps (transforms) using the `PTransforms.withresourcehints` method. Example: ```python pcoll | MyPTransform().withresourcehints( min_ram="4GB", accelerator="type:nvidia-tesla-k80;count:1;install-nvidia-driver") pcoll | beam.ParDo(BigMemFn()).withresourcehints( min_ram="30GB") ``` The interpretation and actuation of resource hints can vary between runners.
Project: Vitess (App Definition and Development / Database)
File: release-branches.md

Each major and minor releases (X.Y) should have a named `release-X.Y`. This branch should diverge from `main` when the release is declared, after which point only bugfix PRs should be cherry-picked onto the branch. All other activity on `main` will go out with a subsequent major or minor release. ```shell git checkout main git pull --ff-only upstream main git checkout -b release-X.Y git push upstream release-X.Y ``` The branches are named `release-X.Y` to distinguish them from point-in-time tags, which are named `vX.Y.Z`.
Project: Hazelcast Jet (App Definition and Development / Streaming & Messaging)
File: pull_request_template.md

<PR description here> Fixes #NNNN (point out issues this PR fixes, if any) Breaking changes (list specific methods/types/messages): API client protocol format serialized form snapshot format Checklist: [ ] Labels and Milestone set [ ] Added a line in `hazelcast-jet-distribution/src/root/release_notes.txt` (for any non-trivial fix/enhancement/feature) [ ] New public APIs have `@Nonnull/@Nullable` annotations [ ] New public APIs have `@since` tags in Javadoc
Project: StarRocks (App Definition and Development / Database)
File: cbrt.md

displayed_sidebar: "English" Computes the cube root of the argument. This function is supported from v3.3 onwards. ```Haskell DOUBLE cbrt(DOUBLE arg) ``` `arg`: You can specify only a numeric value. This function converts the numeric value into a DOUBLE value before it computes the cube root of the value. Returns a value of the DOUBLE data type. If you specify a non-numeric value, this function returns `NULL`. ```Plain mysql> select cbrt(8); ++ | cbrt(8) | ++ | 2 | ++ mysql> select cbrt(-8); +-+ | cbrt(-8) | +-+ | -2 | +-+ mysql> select cbrt(0); ++ | cbrt(0) | ++ | 0 | ++ mysql> select cbrt(""); +-+ | cbrt('') | +-+ | NULL | +-+ ``` cbrt, cube root
Project: Pravega (App Definition and Development / Streaming & Messaging)
File: operators.md

<!-- Copyright Pravega Authors. 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. --> A Pravega Cluster is formed by Pravega services (Controller, Segment Store), but it also requires to run other services to work: (consensus service) and (durable log). For this reason, the Pravega project has contributed open-source Kubernetes Operators to deploy these services as well. The available operators under the Pravega organizations are:
Project: ArangoDB (App Definition and Development / Database)
File: app-map-filelib.md

+++ title = "Mapping the File I/O library into the Application" weight = 40 +++ To handle the File I/O library, once again we turn to custom `ValueOrError` converters: {{% snippet "finale.cpp" "appmapfilelib" %}} Note that the conversion exactly duplicates the implementation of `throwassystemerrorwithpayload(failureinfo fi)` from namespace `filelib`. In a production implementation, you probably ought to call that function and catch the exception it throws into a pointer, as that would be more long term maintainable.
Project: Open Policy Administration Layer (OPAL) (Provisioning / Security & Compliance)
File: scopes.md

OPAL Scopes allows OPAL to serve different policies and data sources, serving them to multiple clients. Every scope contains its own policy and data sources. All clients using the same Scope ID will get the same policy and data. Scopes are an easy way to use OPAL with multiple Git repositories (or other sources of policy), and are a core feature to enable using OPAL itself as a multi-tenant service. Scopes are dynamic, and can be created on the fly through the scopes API (`/scopes`) #### Prerequisites Scopes are supported in OPAL 0.2.0 and above. Use the to quickly get started. The server must be started with the environment variable `OPAL_SCOPES=1`. In this scenario, we create two different scopes (internal and external), that, for example, can be used for an internal and external facing app. The internal scope uses policies located in the internal directory, and external uses policies defined in the external directory. We can set different directories, different branches, different repositories, and any other setting. The authorization used in this example are GitHub Personal Access Tokens that can be . ```bash curl --request PUT 'http://opal_server/scopes' --header 'Content-Type: application/json' --header 'Authorization: $OPAL_TOKEN' --data-raw '{ "scope_id": "internal", "policy": { "source_type": "git", "url": "https://github.com/company/policy", "auth": { "authtype": "githubtoken", "token": "github_token" }, "directories": [ "internal" ], "extensions": [ ".rego", ".json" ], "manifest": ".manifest", "poll_updates": true, "branch": "main" }, "data": { "entries": [] } }' ``` ```bash curl --request PUT 'http://opal_server/scopes' --header 'Content-Type: application/json' --header 'Authorization: $OPAL_TOKEN' --data-raw '{ "scope_id": "external", "policy": { "source_type": "git", "url": "https://github.com/company/policy", "auth": { "authtype": "githubtoken", "token": "github_token" }, "directories": [ "external" ], "extensions": [ ".rego", ".json" ], "manifest": ".manifest", "poll_updates": true, "branch": "main" }, "data": { "entries": [] } }' ``` ```bash docker run -it \ --env OPALCLIENTTOKEN \ --env OPALSERVERURL \ --env OPALDATATOPICS \ --env OPALSCOPEID=internal \ -p 7766:7000 \ -p 8181:8181 \ permitio/opal-client ```
Project: StarRocks (App Definition and Development / Database)
File: floor.md

displayed_sidebar: "English" Returns the largest integer that is not more than `x`. ```SQL FLOOR(x); ``` `x`: DOUBLE is supported. Returns a value of the BIGINT data type. ```Plaintext mysql> select floor(3.14); +-+ | floor(3.14) | +-+ | 3 | +-+ 1 row in set (0.01 sec) ```