cwielenb/CNCF-Dataset huggingface dataset:
Project: Shifu (Provisioning / Automation & Configuration)
File: telemetry-service.md

`TelemetryService` is part of the `Shifu` CRD. It describes a service endpoint which *deviceShifu* can push data to using the telemetry configuration, checkout the `TelemetryService` should be able to read telemetry from devices and push to dedicated endpoints(e.g, HTTP, MQTT, MySQL, MinIO) A `TelemetryService` object should be able to describe most existing service endpoints such as `MySQL`, `HTTP` servers, `MQTT` endpoints, `MinIO` etc. But it should not be able to describe and compatible with 100% of the existing service endpoints. ```mermaid graph LR; device -->|Telemetries HTTP/OPCUA| deviceShifuA; deviceShifuA -->|HTTP| TelemetryService; TelemetryService -->|HTTP/MQTT/MySQL/TDengine/MinIO| EndPoint ``` `TelemetryService` would be served as a stand-alone service, which would collect telemetries from deviceShifu and distribute the telemetries to dedicated endpoints. A `TelemetryService` object consists following configuration: name serviceType serviceSettings `serviceType` is the type of service, can be `HTTP` for now, with more support on the way. `serviceSettings` is settings related to the specific service. ```yaml #telemetry_service.yaml apiVersion: shifu.edgenesis.io/v1alpha1 kind: TelemetryService metadata: name: push-endpoint-1 spec: type: HTTP address: 1.2.3.4:1234/api1 serviceSettings: HTTPSetting: username: admin password: password ``` `TelemetryService` will be introduced as a stand-alone service. It will take HTTP request containing telemetries and convert it to whatever protocol the endpoint requires. We put `TelemetryService` as a stand-alone service instead of embed it into `deviceShifu` for 2 reasons. We want to keep the northbound requests, both into and out of `deviceShifu` HTTP requests. We want to keep each protocol-specific `deviceShifu` type light-weight and only contains protocols necessary. We can re-utilize the existing TelemetryServiceSpec struct defined in telemetrysevice_types to serve as the config we need to connect to the telemetry endpoints. We can introduce a new struct `TelemetryServiceRequest` to contain a EndpointSpec and raw telemetry data. ```go // TelemetryServiceRequest defines the request deviceShifu send to TelemetryService type TelemetryServiceRequest struct { // EndpointSpec would contain connection config needed for TelemetryService to connect with the endpoint EndpointSpec TelemetryServiceSpec `json:"endpoint_spec,omitempty"` RawData string `json:"raw_data,omitempty"` } ``` When `TelemetryService` receives such request, it will use `EndpointSpec` to connect to required telemetry endpoint and send raw telemetry data over. How to deal with telemetry raw data would be determined by the user. Currently, `TelemetryService` support HTTP, MySQL, TDengine, MQTT, MinIO endpoints, and we plan to support more protocols.
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_builder_template.md

title: kbcli builder template tpl - a developer tool integrated with KubeBlocks that can help developers quickly generate rendered configurations or scripts based on Helm templates, and discover errors in the template before creating the database cluster. ``` kbcli builder template [flags] ``` ``` kbcli builder template --helm deploy/redis -a ``` ``` --clean specify whether to clear the output dir --cluster string the cluster yaml file --cluster-definition string specify the cluster definition name --cluster-version string specify the cluster version name --component-name string specify the component name of the clusterdefinition --config-spec string specify the config spec to be rendered --cpu string specify the cpu of the component --helm string specify the helm template dir --helm-output string specify the helm template output dir -h, --help help for template --memory string specify the memory of the component -o, --output-dir string specify the output directory -r, --replicas int32 specify the replicas of the component (default 1) --volume-name string specify the data volume name of the component ``` ``` --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 --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 ``` - builder command.
Project: KICS (Provisioning / Security & Compliance)
File: 5400f379-a347-4bdd-a032-446465fdcc6f.md

title: Trusted Microsoft Services Not Enabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 5400f379-a347-4bdd-a032-446465fdcc6f Query name: Trusted Microsoft Services Not Enabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: Trusted Microsoft Services should be enabled for Storage Account access<br> ```tf title="Positive test num. 1 - tf file" hl_lines="8 21" resource "azurermstorageaccountnetworkrules" "positive1" { resourcegroupname = azurermresourcegroup.test.name storageaccountname = azurermstorageaccount.test.name default_action = "Allow" ip_rules = ["127.0.0.1"] virtualnetworksubnetids = [azurermsubnet.test.id] bypass = ["Metrics"] } resource "azurermstorageaccount" "positive2" { name = "storageaccountname" resourcegroupname = azurermresourcegroup.example.name location = azurermresourcegroup.example.location account_tier = "Standard" accountreplicationtype = "LRS" network_rules { default_action = "Deny" bypass = ["None"] ip_rules = ["100.0.0.1"] virtualnetworksubnetids = [azurermsubnet.example.id] } tags = { environment = "staging" } } ``` ```tf title="Negative test num. 1 - tf file" resource "azurermstorageaccount" "negative1" { name = "storageaccountname" resourcegroupname = azurermresourcegroup.example.name location = azurermresourcegroup.example.location account_tier = "Standard" accountreplicationtype = "LRS" network_rules { default_action = "Deny" bypass = ["AzureServices"] ip_rules = ["100.0.0.1"] virtualnetworksubnetids = [azurermsubnet.example.id] } tags = { environment = "staging" } } resource "azurermstorageaccountnetworkrules" "negative2" { resourcegroupname = azurermresourcegroup.test.name storageaccountname = azurermstorageaccount.test.name default_action = "Allow" ip_rules = ["127.0.0.1"] virtualnetworksubnetids = [azurermsubnet.test.id] bypass = ["Metrics", "AzureServices"] } ```
Project: YugabyteDB (App Definition and Development / Database)
File: getset.md

title: GETSET linkTitle: GETSET description: GETSET menu: preview: parent: api-yedis weight: 2090 aliases: /preview/api/redis/getset /preview/api/yedis/getset type: docs `GETSET key value` This command is an atomic read and write operation that gets the existing value that is associated with the given `key` while rewriting it with the given `value`. If the given `key` does not exist, the given `value` is inserted for the `key`, and null is returned. If the given `key` is associated with non-string data, an error is raised. Returns the old value of the given `key`. ```sh $ SET yugakey 1 ``` ``` "OK" ``` ```sh $ GETSET yugakey 2 ``` ``` 1 ``` , , , , , , ,
Project: Chef InSpec (Provisioning / Security & Compliance)
File: google_compute_network_endpoint_groups.md

+++ title = "googlecomputenetworkendpointgroups resource" draft = false gh_repo = "inspec" platform = "gcp" [menu] [menu.inspec] title = "googlecomputenetworkendpointgroups" identifier = "inspec/resources/gcp/googlecomputenetworkendpointgroups.md googlecomputenetworkendpointgroups resource" parent = "inspec/resources/gcp" +++ A `googlecomputenetworkendpointgroups` is used to test a Google NetworkEndpointGroup resource This resource has beta fields available. To retrieve these fields, include `beta: true` in the constructor for the resource ```ruby describe googlecomputenetworkendpointgroups(project: 'chef-gcp-inspec', zone: 'zone') do its('default_ports') { should include '90' } its('names') { should include 'inspec-gcp-endpoint-group' } end ``` Properties that can be accessed from the `googlecomputenetworkendpointgroups` resource: See the resource for more information. `ids` : an array of `googlecomputenetworkendpointgroup` id `names` : an array of `googlecomputenetworkendpointgroup` name `descriptions` : an array of `googlecomputenetworkendpointgroup` description `networkendpointtypes` : an array of `googlecomputenetworkendpointgroup` networkendpointtype `sizes` : an array of `googlecomputenetworkendpointgroup` size `networks` : an array of `googlecomputenetworkendpointgroup` network `subnetworks` : an array of `googlecomputenetworkendpointgroup` subnetwork `default_ports` : an array of `googlecomputenetworkendpointgroup` default_port `zones` : an array of `googlecomputenetworkendpointgroup` zone 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: Podman (App Definition and Development / Application Definition & Image Build)
File: user.md

Sets the username or UID used and, optionally, the groupname or GID for the specified command. Both user and group may be symbolic or numeric. Without this argument, the command runs as the user specified in the container image. Unless overridden by a `USER` command in the Containerfile or by a value passed to this option, this user generally defaults to root. When a user namespace is not in use, the UID and GID used within the container and on the host match. When user namespaces are in use, however, the UID and GID in the container may correspond to another UID and GID on the host. In rootless containers, for example, a user namespace is always used, and root in the container by default corresponds to the UID and GID of the user invoking Podman.
Project: ScalarDB (App Definition and Development / Database)
File: pull_request_template.md

Provide a brief description about why this PR is necessary. Be sure to provide context. If this PR addresses or references any issues and/or other PRs, list them here. For example, "Fixes #123", "Related to #456", or "Addresses #789". Outline the specific changes made in this pull request. Include relevant details, such as added features, bug fixes, code refactoring, or improvements. The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item. [ ] I have commented my code, particularly in hard-to-understand areas. [ ] I have updated the documentation to reflect the changes. [ ] Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.). [ ] Tests (unit, integration, etc.) have been added for the changes. [ ] My changes generate no new warnings. [ ] Any dependent changes in other PRs have been merged and published. Provide any additional information or notes that may be relevant to the reviewers or stakeholders. Provide release note text for this PR based on the guidelines at . For example: Added validation for the Consensus Commit mutation operation.
Project: KICS (Provisioning / Security & Compliance)
File: ffac8a12-322e-42c1-b9b9-81ff85c39ef7.md

title: HTTP Port Open To Internet hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: ffac8a12-322e-42c1-b9b9-81ff85c39ef7 Query name: HTTP Port Open To Internet Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Networking and Firewall URL: The HTTP port is open to the internet in a Security Group<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1 14" resource "awssecuritygroup" "positive1" { name = "httppositivetcp_1" description = "Gets the HTTP port open with the tcp protocol" ingress { description = "HTTP port open" from_port = 78 to_port = 91 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } resource "awssecuritygroup" "positive2" { name = "httppositivetcp_2" description = "Gets the HTTP port open with the tcp protocol" ingress { description = "HTTP port open" from_port = 60 to_port = 85 protocol = "tcp" cidr_blocks = ["0.0.0.2/0"] } ingress { description = "HTTP port open" from_port = 65 to_port = 81 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } } ``` ```tf title="Negative test num. 1 - tf file" resource "awssecuritygroup" "negative1" { name = "negative_http" description = "Doesn't get the HTTP port open" } resource "awssecuritygroup" "negative2" { ingress { from_port = 70 to_port = 81 protocol = "tcp" } } resource "awssecuritygroup" "negative3" { ingress { from_port = 79 to_port = 100 protocol = "tcp" cidr_blocks = ["0.1.0.0/0"] } } ```
Project: Apache Spark (App Definition and Development / Streaming & Messaging)
File: sql-ref-syntax-aux-exec-imm.md

layout: global title: EXECUTE IMMEDIATE displayTitle: EXECUTE IMMEDIATE 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. Executes a sql statement provided as a `STRING`, optionally passing `argexprN` to parameter markers and assigning the results to `varnameN`. ```sql EXECUTE IMMEDIATE sql_string [ INTO var_name [, ] ] [ USING { (argexpr [ AS ] [alias] [, ] ) | argexpr [ AS ] [alias] [, ] } ] ``` sql_string* A STRING expression producing a well-formed SQL statement. INTO var_name [, ]* Optionally returns the results of a single row query into SQL variables. If the query returns no rows the result is NULL. `var_name` A SQL variable. A variable may not be referenced more than once. USING arg_expr [, ]* Optionally, if sql_string contains parameter markers, binds in values to the parameters. `arg_expr` An expression that binds to a parameter marker. If the parameter markers are unnamed the binding is by position. For unnamed parameter markers, binding is by name. `alias` Overrides the name used to bind `arg_expr` to a named parameter marker Each named parameter marker must be matched once. Not all arg_expr must be matched. ```sql -- A self-contained execution using a literal string EXECUTE IMMEDIATE 'SELECT SUM(c1) FROM VALUES(?), (?)' USING 5, 6; 11 -- A SQL string composed in a SQL variable DECLARE sqlStr = 'SELECT SUM(c1) FROM VALUES(?), (?)'; DECLARE arg1 = 5; DECLARE arg2 = 6; EXECUTE IMMEDIATE sqlStr USING arg1, arg2; 11 -- Using the INTO clause DECLARE sum INT; EXECUTE IMMEDIATE sqlStr INTO sum USING arg1, arg2; SELECT sum; 11 -- Using named parameter markers SET VAR sqlStr = 'SELECT SUM(c1) FROM VALUES(:first), (:second)'; EXECUTE IMMEDIATE sqlStr INTO (sum) USING 5 AS first, arg2 AS second; SELECT sum; 11 ```
Project: secureCodeBox (Provisioning / Security & Compliance)
File: scan-type.md

title: "ScanType" sidebar_position: 4 The ScanType Custom Resource Definition (CRD) is used to define to the secureCodeBox how a specific scanner can be executed in Kubernetes. The main part of the ScanType is the , which contains a Kubernetes Job definition that will be used to construct the scans Job. The `extractResults` field contains an object (fields of the object listed below) which describes what types of results this scanType produced and from where these should be extracted. The `type` field indicates the type of the file. Usually a combination of the scanner name and file type. E.g. `nmap-xml` The type is used to determine which parser would be used to handle this result file. The `location` field describes from where the result file can be extracted. The absolute path on the containers file system. Must be located in `/home/securecodebox/` so that the result is reachable by the secureCodeBox Lurker sidecar which performs the actual extraction of the result. E.g. `/home/securecodebox/nmap-results.xml` Template of the Kubernetes job to create when running the scan. For info about the JobTemplate generic parameters, see here: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.19/#job-v1-batch When specified, as with the `ttlSecondsAfterFinished` parameter, the values from `values.yaml` will be used in the JobTemplate. ```yaml apiVersion: "execution.securecodebox.io/v1" kind: ScanType metadata: name: "typo3scan" spec: extractResults: type: typo3scan-json location: "/home/securecodebox/typo3scan.json" jobTemplate: spec: {{- if .Values.scanner.ttlSecondsAfterFinished }} ttlSecondsAfterFinished: {{ .Values.scanner.ttlSecondsAfterFinished }} {{- end }} backoffLimit: {{ .Values.scanner.backoffLimit }} template: spec: restartPolicy: Never containers: name: typo3scan image: "{{ .Values.scanner.image.repository }}:{{ .Values.scanner.image.tag | default .Chart.AppVersion }}" command: "python3" "/home/typo3scan/typo3scan.py" "--no-interaction" "--json" resources: {{- toYaml .Values.scanner.resources | nindent 16 }} securityContext: {{- toYaml .Values.scanner.securityContext | nindent 16 }} env: {{- toYaml .Values.scanner.env | nindent 16 }} volumeMounts: {{- toYaml .Values.scanner.extraVolumeMounts | nindent 16 }} {{- if .Values.scanner.extraContainers }} {{- toYaml .Values.scanner.extraContainers | nindent 12 }} {{- end }} volumes: {{- toYaml .Values.scanner.extraVolumes | nindent 12 }} ```
Project: Sonobuoy (Provisioning / Security & Compliance)
File: 2019-04-30-custom-testing.md

title: Fast and Easy Sonobuoy Plugins for Custom Testing of Almost Anything image: /img/sonobuoy.svg excerpt: It is now possible to easily create a plugin from a Docker image and run it within Sonobuoy without manually editing any YAML files. author_name: John Schnake author_url: https://github.com/johnschnake author_avatar: /img/contributors/john-schnake.png categories: [kubernetes] tags: ['Sonobuoy Team', 'John Schnake'] date: 2019-04-30 slug: custom-testing Previously posted on the Today we are releasing Sonobuoy 0.14.2, which delivers on one of our top roadmap goals: increased support for custom plugins, allowing developers and operators to extend Sonobuoy with additional tests and data gathering. It is now possible to easily create a plugin from a Docker image and run it within Sonobuoy without manually editing any YAML files. Sonobuoy, an open source diagnostic tool, runs upstream Kubernetes tests to generate reports that help you understand the state of your cluster. Sonobuoy is the underlying technology powering the Certified Kubernetes Conformance Program, which was created by the Cloud Native Computing Foundation (CNCF) and is used by every Certified Kubernetes Service Provider.
Project: ClickHouse (App Definition and Development / Database)
File: template-setting.md

Description. For the switch setting, use the typical phrase: Enables or disables something . Possible values: For switcher setting: 0 Disabled. 1 Enabled. For another setting (typical phrases): Positive integer. 0 Disabled or unlimited or something else. Default value: `value`. Additional Info (Optional) The name of an additional section can be any, for example, Usage. See Also (Optional)
Project: YDB (App Definition and Development / Database)
File: flatten_by.md

Converts rows in the source table using vertical unpacking of of variable length (lists or dictionaries). For example: Source table: |[a, b, c]|1| | | | |[d]|2| |[]|3| The table resulting from `FLATTEN BY` on the left column: |a|1| | | | |b|1| |c|1| |d|2| {% if featurecolumncontainer_type != true %} {{ backend_name }} tables don't support container types, so the FLATTEN BY function can only be applied to table-type variables created within a YQL query. {% endif %} Example ```(sql) $sample = AsList( AsStruct(AsList('a','b','c') AS value, CAST(1 AS Uint32) AS id), AsStruct(AsList('d') AS value, CAST(2 AS Uint32) AS id), AsStruct(AsList() AS value, CAST(3 AS Uint32) AS id) ); SELECT value, id FROM as_table($sample) FLATTEN BY (value); ``` This conversion can be convenient in the following cases: When it is necessary to output statistics by cells from a container column (for example, via ). {% if feature_join %} When the cells in a container column store IDs from another table that you want to join with . {% endif %} Syntax `FLATTEN BY` is specified after `FROM`, but before `GROUP BY`, if `GROUP BY` is present in the query. The type of the result column depends on the type of the source column: | Container type | Result type | Comments | | | | | | `List<X>` | `X` | List cell type | | `Dict<X,Y>` | `Tuple<X,Y>` | Tuple of two elements containing key-value pairs | | `Optional<X>` | `X` | The result is almost equivalent to the clause `WHERE foo IS NOT NULL`, but the `foo` column type is changed to `X` | By default, the result column replaces the source column. Use `FLATTEN BY foo AS bar` to keep the source container. As a result, the source container is still available as `foo` and the output container is available as `bar`. To build a Cartesian product of multiple container columns, use the clause `FLATTEN BY (a, b, c)`. Parentheses are mandatory to avoid grammar conflicts. Inside `FLATTEN BY`, you can only use column names from the input table. To apply `FLATTEN BY` to the calculation result, use a subquery. In `FLATTEN BY ` you can use both columns and arbitrary named expressions (unlike columns, `AS` is required in this case). To avoid grammatical ambiguities of the expression after `FLATTEN BY`, make sure to use parentheses with the following: `... FLATTEN BY (ListSkip(col, 1) AS col) ...` If the source column had nested containers, for example, `List<DictX,Y>`, `FLATTEN BY` unpacks only the outer level. To completely unpack the nested containers, use a subquery. {% note info %} `FLATTEN BY` interprets as lists of length 0 or 1. The table rows with `NULL` are skipped, and the column type changes to a similar non-optional type. `FLATTEN BY` makes only one conversion at a time, so use `FLATTEN LIST BY` or `FLATTEN OPTIONAL BY` on optional containers, for example, `Optional<List<String>>`. {% endnote %}