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

displayed_sidebar: "English" Returns the floating point remainder of the division ( `dividend`/`divisor` ). It is a modulo function. ```SQL fmod(dividend,devisor); ``` `dividend`: DOUBLE or FLOAT is supported. `devisor`: DOUBLE or FLOAT is supported. Note The data type of `devisor` needs to be the same as the data type of `dividend`. Otherwise, StarRocks performs implicit conversion to convert the data type. The data type and sign of output need to be the same as the data type and sign of `dividend`. If `divisor` is `0`, `NULL` is returned. ```Plaintext mysql> select fmod(3.14,3.14); ++ | fmod(3.14, 3.14) | ++ | 0 | ++ mysql> select fmod(11.5,3); ++ | fmod(11.5, 3) | ++ | 2.5 | ++ mysql> select fmod(3,6); ++ | fmod(3, 6) | ++ | 3 | ++ mysql> select fmod(3,0); ++ | fmod(3, 0) | ++ | NULL | ++ ```
Project: Chef Habitat (App Definition and Development / Application Definition & Image Build)
File: habitat_plans_overview.md

A plan is the set of instructions, templates, and configuration files that define how you download, configure, make, install, and manage the lifecycle of the application artifact. The plan is defined in the `habitat` directory at the root of your project repository. The `habitat` directory includes a plan file (`plan.sh` for Linux systems or `plan.ps1` for Windows), a `default.toml` file, an optional `config` directory for configuration templates, and an optional `hooks` directory for lifecycle hooks. You can create this directory at the root of your application with `hab plan init`.
Project: KubeVirt (App Definition and Development / Application Definition & Image Build)
File: local-custom-files.md

KubeVirt system strongly relies on bazel and it is built mostly by files hosted remotely. It is handy to be able to build KubeVirt using custom local files when you want to replace a file with your local copy. For example for replacing an rpm or, as illustrated below, the libguestfs-appliance, or a binary. The guide already explains how to build KubeVirt using custom rpms. Here, we specifically focus in using local files, but the 2 methods can be combined based on your needs. The custom-rpms method might fit better for the cases where you also want to resolve the package dependencies automatically. In the following example, we illustrate how to replace the `libguestfs-appliance` file, but it is valid for any cases using remote files. Copy your custom appliance file in the building container. It is enough to have the directory or the file in the kubevirt directory, and it will be automatically synchronized by the `hack/dockerized` command ```bash $ ls output/ latest-version.txt libguestfs-appliance-1.48.4-qcow2-linux-5.14.0-183-centos9.tar.xz $ ./hack/dockerized ls output go version go1.19.2 linux/amd64 latest-version.txt libguestfs-appliance-1.48.4-qcow2-linux-5.14.0-183-centos9.tar.xz ``` Modify the WORKSPACE to point to your custom appliance: Calculate the checksum of the file: ```bash $ sha256sum output/libguestfs-appliance-1.48.4-qcow2-linux-5.14.0-183-centos9.tar.xz 6bb9db7a4c83992f3e5fadb1dd51080d8cf53aabe6b546ebee6e2e9a52c569bb output/libguestfs-appliance-1.48.4-qcow2-linux-5.14.0-183-centos9.tar.xz ``` Point the WORKSPACE to the file and replace the checksum. In the URL, we need to use the `file` protocol and the file is located in the KubeVirt workspace `/root/go/src/kubevirt.io/kubevirt` + the path of your custom file. ```diff diff --git a/WORKSPACE b/WORKSPACE index fa717cdcd..a27b05d29 100644 a/WORKSPACE +++ b/WORKSPACE @@ -386,9 +386,9 @@ http_archive( http_file( name = "libguestfs-appliance", sha256 = "59fe17973fdaf4d969203b66b1446d855d406aea0736d06ee1cd624100942c8f", sha256 = "6bb9db7a4c83992f3e5fadb1dd51080d8cf53aabe6b546ebee6e2e9a52c569bb", urls = [ "https://storage.googleapis.com/kubevirt-prow/devel/release/kubevirt/libguestfs-appliance/appliance-1.48.4-linux-5.14.0-176-centos9.tar.xz", "file:///root/go/src/kubevirt.io/kubevirt/output/libguestfs-appliance-1.48.4-qcow2-linux-5.14.0-183-centos9.tar.xz", ], ) ``` Build the image with your custom appliance `make bazel-build-images`
Project: Harbor (Provisioning / Container Registry)
File: 2-32-admin-role-search-projects.md

Test 2-32 - Admin Role User Search Projects (DB Mode) ======= To verify that a user with system admin role can search projects when users are managed locally by Harbor (DB mode). User guide This test requires that a Harbor instance is running and available. Harbor is set to authenticate against a local database. ( auth_mode is set to db_auth* .) The user data is stored in a local database. A linux host with Docker CLI installed (Docker client). At least two non-admin users are in Harbor. NOTE: The below non-admin user M should NOT be the same as the non-admin user in Test 2-22. Assign an non-admin user M with system admin role and act as an admin user. Repeat all steps in Test 2-22. A user with system admin role can perform all operations the same as the admin user. Same as Test 2-22. None
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-aux-resource-mgmt-list-file.md

layout: global title: LIST FILE displayTitle: LIST FILE 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. `LIST FILE` lists the resources added by . ```sql LIST { FILE | FILES } file_name [ ... ] ``` ```sql ADD FILE /tmp/test; ADD FILE /tmp/test_2; LIST FILE; -- output for LIST FILE file:/private/tmp/test file:/private/tmp/test_2 LIST FILE /tmp/test /some/random/file /another/random/file --output file:/private/tmp/test ```
Project: KICS (Provisioning / Security & Compliance)
File: 5a443297-19d4-4381-9e5b-24faf947ec22.md

title: Certificate Has Expired hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 5a443297-19d4-4381-9e5b-24faf947ec22 Query name: Certificate Has Expired Platform: Ansible Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Expired SSL/TLS certificates should be removed<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="3" name: upload a self-signed certificate community.aws.aws_acm: certificate: "{{ lookup('file', 'expiredCertificate.pem' ) }}" privateKey: "{{ lookup('file', 'key.pem' ) }}" nametag: mycert region: ap-southeast-2 ``` ```yaml title="Negative test num. 1 - yaml file" name: upload a self-signed certificate2 community.aws.aws_acm: certificate: "{{ lookup('file', 'validCertificate.pem' ) }}" privateKey: "{{ lookup('file', 'key.pem' ) }}" nametag: mycert region: ap-southeast-2 ```
Project: ArangoDB (App Definition and Development / Database)
File: value_or_none.md

+++ title = "`valueornone<T>`" description = "A boolean concept matching types with an optional value." +++ If on C++ 20 or the Concepts TS is enabled, a boolean concept matching types with a public `.has_value()` observer which returns `bool`, and a public `.value()` observer function. If without Concepts, a static constexpr bool which is true for types matching the same requirements, using a SFINAE based emulation. This concept matches optional-like types such as {{% api "std::optional<T>" %}}. Note it also matches {{% api "std::expected<T, E>" %}}, which also has an optional-like interface. You may thus wish to preferentially match {{% api "concepts::valueorerror<T, E>" %}} for any given `T`. Namespace: `BOOSTOUTCOMEV2_NAMESPACE::concepts` Header: `<boost/outcome/convert.hpp>` Legacy: This was named `convert::ValueOrNone<T>` in Outcome v2.1 and earlier. Define {{% api "BOOSTOUTCOMEENABLELEGACYSUPPORT_FOR" %}} to less than `220` to enable.
Project: OceanBase (App Definition and Development / Database)
File: bug_report.md

name: Bug report about: Create a report to help us improve title: "[Bug]: " labels: ["type: bug"] Describe the bug <!-- A clear and concise description of bug. --> Environment <!-- Environment Details sometimes important --> OS Version and CPU Arch(`uname -a`): OB Version(`LDLIBRARYPATH=../lib:$LDLIBRARYPATH ./observer -V`): Fast Reproduce Steps(Required) Steps to reproduce the behavior: Expected behavior <!-- A clear and concise description of what you expected to happen. --> Actual Behavior <!-- What is the result? picture is allowed --> Additional context <!-- Add any other context about the problem here. -->
Project: Podman (App Definition and Development / Application Definition & Image Build)
File: health-startup-cmd.md

Set a startup healthcheck command for a container. This command is executed inside the container and is used to gate the regular healthcheck. When the startup command succeeds, the regular healthcheck begins and the startup healthcheck ceases. Optionally, if the command fails for a set number of attempts, the container is restarted. A startup healthcheck can be used to ensure that containers with an extended startup period are not marked as unhealthy until they are fully started. Startup healthchecks can only be used when a regular healthcheck (from the container's image or the --health-cmd option) is also set.
Project: EMQ Technologies (App Definition and Development / Streaming & Messaging)
File: fix-10976.en.md

Fix topic-filter overlapping handling in shared subscription. In the previous implementation, the storage method for subscription options did not provide adequate support for shared subscriptions. This resulted in message routing failures and leakage of routing tables between nodes during the "subscribe-unsubscribe" process with specific order and topics. Hook callback `session.subscribed` and `client.subscribe` will now receive shared subscription in its full representation, e.g. `$share/group1/topic1/#`, and the `share` property is deleted from `subopts`. Hook callback `session.unsubscribed` and `client.unsubscribe` will now receive shared subscription in its full representation, e.g. `$share/group1/topic1/#` instead of just `topic1/#`. ExHook Proto changed. The `share` field in message `SubOpts` was deprecated. ExHook Server will now receive shared subscription in its full representation, e.g. `$share/group1/topic1/#`, and the `share` property is deleted from message `SubOpts`. `session.subscribed` and `session.unsubscribed` rule-engine events will have shared subscriptions in their full representation for `topic`, e.g. `$share/group1/topic1/#` instead of just `topic1/#`.
Project: StarRocks (App Definition and Development / Database)
File: bitmap_or.md

displayed_sidebar: "English" Calculates the union of two input bitmaps and return a new bitmap. ```Haskell BITMAP BITMAP_OR(BITMAP lhs, BITMAP rhs) ``` ```Plain Text MySQL > select bitmapcount(bitmapor(tobitmap(1), tobitmap(2))) cnt; ++ | cnt | ++ | 2 | ++ MySQL > select bitmapcount(bitmapor(tobitmap(1), tobitmap(1))) cnt; ++ | cnt | ++ | 1 | ++ ``` BITMAP_OR,BITMAP
Project: Harbor (Provisioning / Container Registry)
File: 8-05-Email-edit-email-settings.md

Test 8-05 -Update email settings ======= To verify that an admin user can update email settings. User guide This test requires that a Harbor instance is running and available. A linux host with Docker CLI installed (Docker client). Login UI as admin user. In configuration email page, change email settings. Save settings and logout. Login to check if email settings has been saved. Click test mail server. In step4, email settings can be saved. In step5, if email settings are correct, test will successful. None
Project: Open Policy Agent (OPA) (Provisioning / Security & Compliance)
File: carbonetes.md

title: Carbonetes - BrainIAC software: github brainiac labels: layer: Infrastructure category: security type: poweredbyopa code: https://github.com/carbonetes/brainiac inventors: carbonetes BrainIAC uses static code analysis to analyze IAC code to detect security issues before deployment. This tool can scan for issues like security policy misconfigurations, insecure cloud-based services, and compliance issues. The BrainIAC tool performs a comprehensive code scan and generates reports containing detailed insights into the identified issues..
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: hadoop-provided.md

layout: global displayTitle: Using Spark's "Hadoop Free" Build title: Using Spark's "Hadoop Free" Build 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. Spark uses Hadoop client libraries for HDFS and YARN. Starting in version Spark 1.4, the project packages "Hadoop free" builds that lets you more easily connect a single Spark binary to any Hadoop version. To use these builds, you need to modify `SPARKDISTCLASSPATH` to include Hadoop's package jars. The most convenient place to do this is by adding an entry in `conf/spark-env.sh`. This page describes how to connect Spark to Hadoop for different types of distributions. For Apache distributions, you can use Hadoop's 'classpath' command. For instance: {% highlight bash %} export SPARKDISTCLASSPATH=$(hadoop classpath) export SPARKDISTCLASSPATH=$(/path/to/hadoop/bin/hadoop classpath) export SPARKDISTCLASSPATH=$(hadoop --config /path/to/configs classpath) {% endhighlight %} To run the Hadoop free build of Spark on Kubernetes, the executor image must have the appropriate version of Hadoop binaries and the correct `SPARKDISTCLASSPATH` value set. See the example below for the relevant changes needed in the executor Dockerfile: {% highlight bash %} ENV SPARK_HOME="/opt/spark" ENV HADOOP_HOME="/opt/hadoop" ENV PATH="$SPARKHOME/bin:$HADOOPHOME/bin:$PATH" ... COPY /opt/hadoop3 $HADOOP_HOME ... ENTRYPOINT [ "/opt/entrypoint.sh" ] ... {% endhighlight %}
Project: ClickHouse (App Definition and Development / Database)
File: deltalake.md

slug: /en/engines/table-engines/integrations/deltalake sidebar_position: 40 sidebar_label: DeltaLake This engine provides a read-only integration with existing tables in Amazon S3. Note that the Delta Lake table must already exist in S3, this command does not take DDL parameters to create a new table. ``` sql CREATE TABLE deltalake ENGINE = DeltaLake(url, [awsaccesskeyid, awssecretaccesskey,]) ``` Engine parameters `url` Bucket url with path to the existing Delta Lake table. `awsaccesskeyid`, `awssecretaccesskey` - Long-term credentials for the account user. You can use these to authenticate your requests. Parameter is optional. If credentials are not specified, they are used from the configuration file. Engine parameters can be specified using . Example ```sql CREATE TABLE deltalake ENGINE=DeltaLake('http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/test_table/', 'ABC123', 'Abc+123') ``` Using named collections: ``` xml <clickhouse> <named_collections> <deltalake_conf> <url>http://mars-doc-test.s3.amazonaws.com/clickhouse-bucket-3/</url> <accesskeyid>ABC123<accesskeyid> <secretaccesskey>Abc+123</secretaccesskey> </deltalake_conf> </named_collections> </clickhouse> ``` ```sql CREATE TABLE deltalake ENGINE=DeltaLake(deltalakeconf, filename = 'testtable') ```
Project: KICS (Provisioning / Security & Compliance)
File: b5d6a2e0-8f15-4664-bd5b-68ec5c9bab83.md

title: BOM - AWS S3 Buckets hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: b5d6a2e0-8f15-4664-bd5b-68ec5c9bab83 Query name: BOM - AWS S3 Buckets Platform: CloudFormation Severity: <span style="color:#CCCCCC">Trace</span> Category: Bill Of Materials URL: A list of S3 resources found. Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance.<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="4" AWSTemplateFormatVersion: 2010-09-09 Description: Creating S3 bucket Resources: MyBucket: Type: AWS::S3::Bucket Properties: AccessControl: BucketOwnerFullControl BucketName: jenkins-artifacts VersioningConfiguration: Status: Enabled Tags: Key: CostCenter Value: ITEngineering Key: Type Value: CICD BucketEncryption: ServerSideEncryptionConfiguration: ServerSideEncryptionByDefault: SSEAlgorithm: 'aws:kms' KMSMasterKeyID: KMS-KEY-ARN SampleBucketPolicy: Type: AWS::S3::BucketPolicy Properties: Bucket: !Ref MyBucket PolicyDocument: Version: 2012-10-17 Statement: Action: 's3:GetObject' Effect: Allow Resource: !Join '' - 'arn:aws:s3:::' !Ref DOC-EXAMPLE-BUCKET /* Principal: '*' Condition: StringLike: 'aws:Referer': 'http://www.example.com/*' 'http://example.net/*' ``` ```json title="Positive test num. 2 - json file" hl_lines="5" { "AWSTemplateFormatVersion": "2010-09-09T00:00:00Z", "Description": "Creating S3 bucket", "Resources": { "JenkinsArtifacts03": { "Type": "AWS::S3::Bucket", "Properties": { "BucketName": "jenkins-artifacts", "VersioningConfiguration": { "Status": "Enabled" }, "Tags": [ { "Key": "CostCenter", "Value": "ITEngineering" }, { "Key": "Type", "Value": "CICD" } ], "AccessControl": "BucketOwnerFullControl" } } } } ``` ```yaml title="Negative test num. 1 - yaml file" AWSTemplateFormatVersion: '2010-09-09' Resources: myDistribution: Type: AWS::CloudFront::Distribution Properties: DistributionConfig: Enabled: true ``` ```json title="Negative test num. 2 - json file" { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "myDistribution": { "Type": "AWS::CloudFront::Distribution", "Properties": { "DistributionConfig": { "Enabled": "true" } } } } } ```
Project: Beam (App Definition and Development / Streaming & Messaging)
File: case-study.md

title: "Case Study" aliases: /community/ <!-- 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. --> Your company uses Apache Beam? There are several options to highlight it and make your company stand out! Sharing your story and making a Case Study out of it might have a significant impact on helping users with adopting Apache Beam. And, of course, gaining interest for your company. Please see for the next steps, templates and helpful tips. If you have any questions about adding a case study, please . Want to tell the world you are using Apache Beam? Just walk through and make it happen! The Apache Beam PMC reserves the right to remove logos of companies that are not deemed to be in good standing in the community.
Project: KICS (Provisioning / Security & Compliance)
File: ed89b97d-04e9-4fd4-919f-ee5b27e555e9.md

title: Kubelet Streaming Connection Timeout Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: ed89b97d-04e9-4fd4-919f-ee5b27e555e9 Query name: Kubelet Streaming Connection Timeout Disabled Platform: Kubernetes Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: The flag --streaming-connection-idle-timeout should not be set to 0<br> ```yaml title="Positive test num. 1 - yaml file" hl_lines="11" apiVersion: v1 kind: Pod metadata: name: command-demo labels: purpose: demonstrate-command spec: containers: name: command-demo-container image: foo/bar command: ["kubelet"] args: ["--streaming-connection-idle-timeout=0"] restartPolicy: OnFailure ``` ```yaml title="Positive test num. 2 - yaml file" hl_lines="8" apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration address: "192.168.0.8" port: 20250 serializeImagePulls: false evictionHard: memory.available: "200Mi" streamingConnectionIdleTimeout: 0s ``` ```json title="Positive test num. 3 - json file" hl_lines="10" { "apiVersion": "kubelet.config.k8s.io/v1beta1", "evictionHard": { "memory.available": "200Mi" }, "kind": "KubeletConfiguration", "serializeImagePulls": false, "address": "192.168.0.8", "port": 20250, "streamingConnectionIdleTimeout": "0s" } ``` ```yaml title="Negative test num. 1 - yaml file" apiVersion: v1 kind: Pod metadata: name: command-demo labels: purpose: demonstrate-command spec: containers: name: command-demo-container image: foo/bar command: ["kubelet"] args: [""] restartPolicy: OnFailure ``` ```yaml title="Negative test num. 2 - yaml file" apiVersion: kubelet.config.k8s.io/v1beta1 kind: KubeletConfiguration address: "192.168.0.8" port: 20250 serializeImagePulls: false evictionHard: memory.available: "200Mi" ``` ```json title="Negative test num. 3 - json file" { "address": "192.168.0.8", "apiVersion": "kubelet.config.k8s.io/v1beta1", "evictionHard": { "memory.available": "200Mi" }, "kind": "KubeletConfiguration", "port": 20250, "serializeImagePulls": false } ```