cwielenb/CNCF-Dataset huggingface dataset:
Project: MongoDB (App Definition and Development / Database)
File: baton.md

Batons are lightweight job queues in mongod and mongos processes that allow recording the intent to execute a task (e.g., polling on a network socket) and deferring its execution to a later time. Batons, often by reusing `Client` threads and through the Waitable interface, move the execution of scheduled tasks out of the line, potentially hiding the execution cost from the critical path. A total of four baton classes are available today: All baton implementations extend Baton. They all expose an interface to allow scheduling tasks on the baton, to demand the awakening of the baton on client socket disconnect, and to create a SubBaton. A SubBaton, for any of the baton types, is essentially a handle to a local object that proxies scheduling requests to its underlying baton until it is detached (e.g., through destruction of its handle). Additionally, a NetworkingBaton enables consumers of a transport layer to execute I/O themselves, rather than delegating it to other threads. They are special batons that are able to poll network sockets, which is not feasible through other baton types. This is essential for minimizing context switches and improving the readability of stack traces. DefaultBaton is the most basic baton implementation. A default baton is tightly associated with an `OperationContext`, and its associated `Client` thread. This baton provides the platform to execute tasks while a client thread awaits an event or a timeout (e.g., via `OperationContext::sleepUntil(...)`), essentially paving the way towards utilizing idle cycles of client threads for useful work. Tasks can be scheduled on this baton through its associated `OperationContext` and using `OperationContext::getBaton()::schedule(...)`. Note that this baton is not available for an `OperationContext` that belongs to a `ServiceContext` with an `AsioTransportLayer` transport layer. In that case, the aforementioned interface will return a handle to AsioNetworkingBaton. This baton is only available for Linux and extends NetworkingBaton to implement a networking reactor. It utilizes `poll(2)` and `eventfd(2)` to allow client threads await events without busy polling. For an example of scheduling a task on the `OperationContext` baton, see . Since any task scheduled on a baton is intended for out-of-line execution, it must be non-blocking and preferably short-lived to ensure forward progress.
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_cluster_describe.md

title: kbcli cluster describe Show details of a specific cluster. ``` kbcli cluster describe NAME [flags] ``` ``` kbcli cluster describe mycluster ``` ``` -h, --help help for describe ``` ``` --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/.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 --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 --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 ``` - Cluster command.
Project: Glasskube (App Definition and Development / Application Definition & Image Build)
File: 03_olm.md

slug: olm sidebar_label: With OLM title: Glasskube vs OLM Comparison description: The Operator Lifecycle Manager (OLM) was introduced by Red Hat to manage operators. Glasskube supports all kinds of cloud-native packages and a GUI. The operator framework was based on a concept from 2016. The two most popular projects are the Operator SDK and the Operator Lifecycle Management. The is a wrapper for Kubernetes SIGS project . An SDK for building Kubernetes APIs using Custom Resource Definitions (CRDs). The Operator SDK also supports writing Operators with Go, Ansible, Helm and even JVM based languages with the which Glasskube uses for its . The is part of the operator framework and a toolkit to provide automatic updates for Kubernetes operators. Although it is not directly part of OpenShift, it is loosely coupled as the related GUI is not open-source and only part of OpenShift, a commercial product. Using the OLM is very complex and consists of multiple CRDs and concepts, but you could achieve something similar to `glasskube install cert-manager` with `kubectl operator install cert-manager -n cert-manager --channel stable --approval Automatic --create-operator-group`, but still lacking a GUI and the simple bootstrap of `glasskube bootstrap`. OLMs lists currently more packages than Glasskube, but will rapidly increase over time. Another difference between Glasskube and OLM is that OLM only supports operators while Glasskube supports all kinds of cloud-native applications. If you are already an OpenShift customer or only want to install operators, OLM might be a good fit for you, but you will enjoy using Glasskube if you work with Kubernetes clusters and are looking for a package manager that supports all kind of packages.
Project: RabbitMQ (App Definition and Development / Streaming & Messaging)
File: 3.11.21.md

RabbitMQ `3.11.21` is a maintenance release in the `3.11.x` . This release series . Please refer to the upgrade section from if upgrading from a version prior to 3.11.0. This release requires Erlang 25 and supports Erlang versions up to `25.3.x`. has more details on Erlang version requirements for RabbitMQ. As of 3.11.0, RabbitMQ requires Erlang 25. Nodes will fail to start on older Erlang releases. Erlang 25 as our new baseline means much improved performance on ARM64 architectures, across all architectures, and the most recent TLS 1.3 implementation available to all RabbitMQ 3.11 users. Release notes can be found on GitHub at . Certain diagnostics operations during rolling upgrades from 3.10 to 3.11 could fail if the `listenerrecordsin_ets` feature flag was enabled in the middle of the upgrade. Contributed by @gomoripeti (CloudAMQP). GitHub issue: On Windows, PowerShell will no longer be used as a fallback for `handle.exe` for computing how many file and socket handles a node uses. If a user does not have `handle.exe`` installed in the `PATH`` of their Windows system, a message will be logged once, and then the total handles being used will be set to 0. PowerShell ended up being a CPU-intensive alternative that's not worth the gains for many installations. GitHub issue: Node maintenance state was not replicated to all nodes, even though it was accessible from any node (and for any node). GitHub issue: Some warnings were emitted even when `--formatter` was set to `json`. GitHub issue: AMQP 1.0 client connections were refused with this plugin. GitHub issue: AMQP 1.0 client connections were refused with this plugin. GitHub issue: `osiris` was upgraded to To obtain source code of the entire distribution, please download the archive named `rabbitmq-server-3.11.21.tar.xz` instead of the source tarball produced by GitHub.
Project: Numaflow (App Definition and Development / Streaming & Messaging)
File: debugging.md

To enable debug logs in a Vertex Pod, set environment variable `NUMAFLOW_DEBUG` to `true` for the Vertex. For example: ```yaml apiVersion: numaflow.numaproj.io/v1alpha1 kind: Pipeline metadata: name: simple-pipeline spec: vertices: name: in source: generator: rpu: 100 duration: 1s name: p1 udf: builtin: name: cat containerTemplate: env: name: NUMAFLOW_DEBUG value: "true" # DO NOT forget the double quotes!!! name: out sink: log: {} edges: from: in to: p1 from: p1 to: out ``` To enable debug logs in the daemon pod, set environment variable `NUMAFLOW_DEBUG` to `true` for the daemon pod. For example: ```yaml apiVersion: numaflow.numaproj.io/v1alpha1 kind: Pipeline metadata: name: simple-pipeline spec: templates: daemon: containerTemplate: env: name: NUMAFLOW_DEBUG value: "true" # DO NOT forget the double quotes!!! ``` If your pipeline is running with `NUMAFLOW_DEBUG` then `pprof` is enabled in the Vertex Pod. You can also enable just `pprof` by setting `NUMAFLOW_PPROF` to `true`. For example, run the commands like below to profile memory usage for a Vertex Pod, a web page displaying the memory information will be automatically opened. ```sh kubectl port-forward simple-pipeline-p1-0-7jzbn 2469 go tool pprof -http localhost:8081 https+insecure://localhost:2469/debug/pprof/heap ``` `Tracing` is also available with commands below. ```sh curl -skq https://localhost:2469/debug/pprof/trace?debug=1 -o trace.out go tool trace -http localhost:8082 trace.out ``` When doing local using command lines such as `make start`, or `make image`, the built `numaflow` docker image is based on `alpine`, which allows you to execute into the container for debugging with `kubectl exec -it {pod-name} -c {container-name} -- sh`. This is not allowed when running pipelines with official released images, as they are based on `scratch`.
Project: Meshery (Provisioning / Automation & Configuration)
File: v0.6.97.md

layout: release date: 2023-06-16 tag: v0.6.97 Changed docs for catalog APIs @abdullah1308 (#7882) Fixed unmarshal error due to catalog API change @abdullah1308 (#7875) fix: Return error instead of nil client connection in gRPC err @Revolyssup (#7878) fix crash in docker env due to GLIBC_2.34 not found @MUzairS15 (#7873) add workflow dispatch for edge-release action @MUzairS15 (#7874) Thank you to our contributors for making this release possible: @MUzairS15, @Revolyssup, @abdullah1308, @leecalcote, @theBeginner86 and MUzairS15
Project: YugabyteDB (App Definition and Development / Database)
File: 04-where.md

title: "WHERE" In this exercise we'll query the orders table and return just the rows that equal the employee\id_ of 8. ``` SELECT order_id, customer_id, employee_id, order_date FROM orders WHERE employee_id=8; ``` This query should return 104 rows. In this exercise we'll query the orders table and return just the rows that have an employee\id of 8 and a customer\id equal to "FOLKO". ``` SELECT order_id, customer_id, employee_id, order_date FROM orders WHERE employee_id=8 AND customer_id= 'FOLKO'; ``` This query should return 6 rows. In this exercise we'll query the orders table and return just the rows that have an employee\id_ of 2 or 1. ``` SELECT order_id, customer_id, employee_id, order_date FROM orders WHERE employee_id=2 OR employee_id=1; ``` This query should return 219 rows. In this exercise we'll query the order\ details table and return just the rows with an order\id of 10360 or 10368. ``` SELECT * FROM order_details WHERE order_id IN (10360, 10368); ``` This query should return 9 rows. In this exercise we'll query the customers table and return just the rows that have a companyname_ that starts with the letter "F". ``` SELECT customer_id, company_name, contact_name, city FROM customers WHERE company_name LIKE 'F%'; ``` This query should return 8 rows. In this exercise we'll query the orders table and return just the rows that have an order\id_ between 10,985 and 11,000. ``` SELECT order_id, customer_id, employee_id, order_date, shippostalcode FROM orders WHERE order_id BETWEEN 10985 AND 11000; ``` This query should return 16 rows. In this exercise we'll query the employees table and return just the rows where the employee\id_ is not eqal to "1". ``` SELECT first_name, last_name, title, address, employee_id FROM employees WHERE employee_id &lt;&gt; 1; ``` This query should return 8 rows.
Project: YDB (App Definition and Development / Database)
File: alert_locks.md

{% note info %} Unlike PostgreSQL, YDB uses optimistic locking. This means that transactions check the conditions for the necessary locks at the end of their operation, not at the beginning. If the lock has been violated during the transaction's execution, such a transaction will end with a `Transaction locks invalidated` error. In this case, you can try to execute a similar transaction again. {% endnote %}
Project: FOSSA (Provisioning / Security & Compliance)
File: paket.md

Paket is a dependency manager for .NET projects. Paket enables precise and predictable control over your dependencies Paket manages your dependencies with three core file types: `paket.dependencies`, where you specify your dependencies and their versions for your entire codebase. `paket.references`, a file that specifies a subset of your dependencies for every project in a solution. `paket.lock`, a lock file that Paket generates when it runs. When you check it into source control, you get reproducible builds. Walk the directory and find all lock files (`paket.lock`) Parse the lock file, and construct a dependency graph: ``` NUGET remote: nuget.com one (1.0.0) two (>1.0.0) two (2.0.0) HTTP remote: custom-site.com three (3.0.0) ``` dependencies can come from either NuGet, Github, or a specified remote URL.
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_cluster_edit-backup-policy.md

title: kbcli cluster edit-backup-policy Edit backup policy ``` kbcli cluster edit-backup-policy ``` ``` kbcli cluster edit-backup-policy <backup-policy-name> kbcli cluster edit-backup-policy <backup-policy-name> --set backupRepoName=<backup-repo-name> kbcli cluster edit-bp <backup-policy-name> ``` ``` -h, --help help for edit-backup-policy --set stringArray set values on the command line (can specify multiple or separate values with commas: key1=val1,key2=val2) ``` ``` --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/.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 --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 --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 ``` - Cluster command.
Project: StarRocks (App Definition and Development / Database)
File: trim.md

displayed_sidebar: "English" Removes consecutive spaces or specified characters from the beginning and end of the `str` argument. Removing specified characters are supported from StarRocks 2.5.0. ```Haskell VARCHAR trim(VARCHAR str[, VARCHAR characters]) ``` `str`: required, the string to trim, which must evaluate to a VARCHAR value. `characters`: optional, the characters to remove, which must be a VARCHAR value. If this parameter is not specified, spaces are removed from the string by default. If this parameter is set to an empty string, an error is returned. Returns a VARCHAR value. Example 1: Remove the five spaces from the beginning and end of the string. ```Plain Text MySQL > SELECT trim(" ab c "); +-+ | trim(' ab c ') | +-+ | ab c | +-+ 1 row in set (0.00 sec) ``` Example 2: Remove specified characters from the beginning and end of the string. ```Plain Text MySQL > SELECT trim("abcd", "ad"); +--+ | trim('abcd', 'ad') | +--+ | bc | +--+ MySQL > SELECT trim("xxabcdxx", "x"); +--+ | trim('xxabcdxx', 'x') | +--+ | abcd | +--+ ```
Project: KICS (Provisioning / Security & Compliance)
File: 0008c003-79aa-42d8-95b8-1c2fe37dbfe6.md

title: Multiple RUN, ADD, COPY, Instructions Listed hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 0008c003-79aa-42d8-95b8-1c2fe37dbfe6 Query name: Multiple RUN, ADD, COPY, Instructions Listed Platform: Dockerfile Severity: <span style="color:#edd57e">Low</span> Category: Best Practices URL: Multiple commands (RUN, COPY, ADD) should be grouped in order to reduce the number of layers.<br> ```dockerfile title="Positive test num. 1 - dockerfile file" hl_lines="2" FROM ubuntu RUN apt-get install -y wget RUN wget https:///downloadedfile.tar RUN tar xvzf downloadedfile.tar RUN rm downloadedfile.tar RUN apt-get remove wget ``` ```dockerfile title="Positive test num. 2 - dockerfile file" hl_lines="2" FROM ubuntu COPY README.md ./ COPY package.json ./ COPY gulpfile.js ./ COPY BUILD_NUMBER ./ ``` ```dockerfile title="Positive test num. 3 - dockerfile file" hl_lines="2" FROM ubuntu ADD cairo.spec /rpmbuild/SOURCES ADD cairo-1.13.1.tar.xz /rpmbuild/SOURCES ADD cairo-multilib.patch /rpmbuild/SOURCES ``` ```dockerfile title="Negative test num. 1 - dockerfile file" FROM ubuntu RUN apt-get install wget && wget https:///downloadedfile.tar && tar xvzf downloadedfile.tar && rm downloadedfile.tar && apt-get remove wget ``` ```dockerfile title="Negative test num. 2 - dockerfile file" FROM ubuntu COPY README.md package.json gulpfile.js BUILD_NUMBER ./ ``` ```dockerfile title="Negative test num. 3 - dockerfile file" FROM ubuntu ADD cairo.spec cairo-1.13.1.tar.xz cairo-multilib.patch /rpmbuild/SOURCES ``` <details><summary>Negative test num. 4 - dockerfile file</summary> ```dockerfile FROM ubuntu COPY README.md ./one COPY package.json ./two COPY gulpfile.js ./three COPY BUILD_NUMBER ./four FROM ubuntu:1.2 ADD README.md ./one ADD package.json ./two ADD gulpfile.js ./three ADD BUILD_NUMBER ./four ``` </details> <details><summary>Negative test num. 5 - dockerfile file</summary> ```dockerfile 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 . ADD cairo.spec /rpmbuild/SOURCES ADD cairo-1.13.1.tar.xz /rpmbuild/SOURCES 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 ``` </details>
Project: Chef Habitat (App Definition and Development / Application Definition & Image Build)
File: ecs.md

+++ title = "Amazon ECS" description = "Amazon ECS registry service and Chef Habitat" gh_repo = "habitat" [menu] [menu.habitat] title = "Amazon Container Services (ECS)" identifier = "habitat/containers/ecs EC2 Container Service" parent = "habitat/containers" weight = 50 +++ Amazon Web Services provides a container management service called . ECS provides a Docker registry, container hosting and tooling to make deploying Docker-based containers fairly straightforward. ECS will schedule and deploy your Docker containers within a Task while Chef Habitat manages the applications. is a fully-managed Docker registry provided by Amazon Web Services. Applications exported to Docker with ```hab pkg export docker``` put the containers into namespaced repositories, so you will need to create these within ECR. For example, if you were building ```core/mongodb``` containers you would use the following command: ```bash $ aws ecr create-repository --repository-name core/mongodb ``` To tag and push the images to the ECR you will use your Repository URI (substituting your aws_account_id and availability zone). ```bash $ docker tag core/mongodb:latest awsaccountid.dkr.ecr.ap-southeast-2.amazonaws.com/core/mongodb:latest $ docker push awsaccountid.dkr.ecr.ap-southeast-2.amazonaws.com/core/mongodb:latest ``` Once Docker images are pushed to ECR, they may be run on Amazon's ECS within a which may be expressed as a . Here is an example of a Tomcat application using a Mongo database demonstrating using Chef Habitat-managed containers: ```yaml docker-compose.yml version: '2' services: mongo: image: awsaccountid.dkr.ecr.ap-southeast-2.amazonaws.com/username/mongodb:latest hostname: "mongodb" national-parks: image: awsaccountid.dkr.ecr.ap-southeast-2.amazonaws.com/username/national-parks:latest ports: "8080:8080" links: mongo command: --peer mongodb --bind database:mongodb.default ``` From the example, the ```mongo``` and ```national-parks``` services use the Docker images from the ECR. The ```links``` entry manages the deployment order of the container and according to the ```links``` should create ```/etc/hosts``` entries. This does not appear to currently work with ECS so we assign the ```hostname: "mongodb"```. The ```command``` entry for the National Parks Tomcat application allows the Chef Habitat Supervisor to ```--peer``` to the ```mongo``` gossip ring and ```--bind``` applies ```database``` entries to its Mongo configuration.
Project: KICS (Provisioning / Security & Compliance)
File: d6355c88-1e8d-49e9-b2f2-f8a1ca12c75b.md

title: Docker Socket Mounted In Container hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: d6355c88-1e8d-49e9-b2f2-f8a1ca12c75b Query name: Docker Socket Mounted In Container Platform: DockerCompose Severity: <span style="color:#bb2124">High</span> Category: Build Process URL: Docker socket docker.sock should not be mounted on host. If the docker socket is mounted, it can allow its processes to execute docker commands.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="9" version: "3.1" services: service1: container_name: service image: notareal/image:latest restart: always volumes: /var/run/docker.sock:/var/run/docker.sock ports: 8080:8080 ``` ```yaml title="Negative test num. 1 - yaml file" version: "3.1" services: service1: container_name: service image: notareal/image:latest restart: always ports: 8080:8080 ```