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

title: ALTER DOMAIN statement [YSQL] headerTitle: ALTER DOMAIN linkTitle: ALTER DOMAIN description: Use the ALTER DOMAIN statement to change the definition of a domain. menu: v2.18: identifier: ddlalterdomain parent: statements type: docs Use the `ALTER DOMAIN` statement to change the definition of a domain. {{%ebnf%}} alterdomaindefault, alterdomainrename {{%/ebnf%}} Set or remove the default value for a domain. Change the name of the domain. Specify the name of the domain. An error is raised if DOMAIN `name` does not exist or DOMAIN `new_name` already exists. ```plpgsql yugabyte=# CREATE DOMAIN idx DEFAULT 5 CHECK (VALUE > 0); ``` ```plpgsql yugabyte=# ALTER DOMAIN idx DROP DEFAULT; ``` ```plpgsql yugabyte=# ALTER DOMAIN idx RENAME TO idx_new; ``` ```plpgsql yugabyte=# DROP DOMAIN idx_new; ```
Project: Nocalhost (App Definition and Development / Application Definition & Image Build)
File: RELEASE.md

The `yaml` Project is released on an as-needed basis. The process is as follows: An issue is proposing a new release with a changelog since the last release All must LGTM this release An OWNER runs `git tag -s $VERSION` and inserts the changelog and pushes the tag with `git push $VERSION` The release issue is closed An announcement email is sent to `kubernetes-dev@googlegroups.com` with the subject `[ANNOUNCE] kubernetes-template-project $VERSION is released`
Project: Meshery (Provisioning / Automation & Configuration)
File: 10-04-2022-19-51-10_6221f429.md

timestamp: "2022-10-04 19:51:03 UTC Tue" meshery-component: meshery-consul meshery-component-version: v0.6.3 meshery-server-version: "v0.6.10" k8s-distro: minikube k8s-version: "v1.20.11" service-mesh: Consul service-mesh-version: "v0.49.0" tests: consul-client: null consul-server: null overall-status: "failing"
Project: KICS (Provisioning / Security & Compliance)
File: 118281d0-6471-422e-a7c5-051bc667926e.md

title: Role With Privilege Escalation By Actions 'iam:SetDefaultPolicyVersion' hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 118281d0-6471-422e-a7c5-051bc667926e Query name: Role With Privilege Escalation By Actions 'iam:SetDefaultPolicyVersion' Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: Role with privilege escalation by actions 'iam:SetDefaultPolicyVersion' and Resource set to '*'. For more information see https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/.<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awsiamrole" "cosmic" { name = "cosmic" } resource "awsiamrolepolicy" "testinline_policy" { name = "testinlinepolicy" role = awsiamrole.cosmic.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "iam:SetDefaultPolicyVersion", ] Effect = "Allow" Resource = "*" }, ] }) } ``` ```tf title="Negative test num. 1 - tf file" resource "awsiamuser" "cosmic2" { name = "cosmic2" } resource "awsiamuserpolicy" "inlinepolicyruninstances2" { name = "inlinepolicyrun_instances" user = awsiamuser.cosmic2.name policy = jsonencode({ Version = "2012-10-17" Statement = [ { Action = [ "ec2:Describe*", ] Effect = "Allow" Resource = "*" }, ] }) } ```
Project: SuperEdge (Provisioning / Automation & Configuration)
File: CHANGELOG-0.6.md

* * EdgeX Foundry: Integrate one-click deployment of native EdgeX Foundry components in edgeadm addon to support the access of edge devices(,) Integrate one-click deployment topolvm in edgeadm addon, users can experience the CSI capabilities of Local PV dynamic configuration PV and dynamic expansion PV(,) Add the feedback of ServiceGroup deployment status and events to increase the convenience for users to operate and maintain the application status of edge sites;(,) Add 3 demos that use ecological components in SuperEdge Deploy Tars demo on SuperEdge to help users use Tars development framework on edge sites;(,) Add an demo of using Tengine + SuperEdge to deploy edge AI applications across platforms to help users use AI-related frameworks in SuperEdge(,) Add an demo of collecting edge application monitoring data so that users can access edge application monitoring(,) ServiceGroup: use template templateHasher modified to reconcile;(,) ServiceGroup: fix event scheme used in ServiceGroup;(,) Use multiple pipes to read an io.ReaderClose at the same time;;(,) Added the use document of edgex found on Superedge(,) Added topolvm use document(,) Added MAINTAINERS and SECURITY file (,)
Project: Metal³ (Provisioning / Automation & Configuration)
File: testing.md

The user running the tests must have permission on the cluster to create CRDs. An example role binding setting for configuring the "developer" user is provided in test/e2e/role_binding.yaml ```bash oc --as system:admin apply -f test/e2e/role_binding.yaml ``` The tests can be run via `make` ```bash make test ``` Run linters test before pushing your commit. ```bash make lint ``` The repository contains a ``hack`` directory which has some very useful scripts for setting up containerized testing environments. It also has Dockerfiles to allow you to generate images for your own use. All the scripts accept the ``CONTAINER_RUNTIME`` environment variable with default of ``podman``. This you can edit to ``docker`` as well. Start by setting the environment variable appropriately ```bash export CONTAINER_RUNTIME=docker ``` From the operator parent dir, you can invoke the hack scripts ```bash ./hack/golint.sh ``` Note It's important to be in the operator parent dir because it contains the ``Makefile`` that is used in running the tests for the operator. Otherwise, you'll see the following error ```bash sh: 0: Can't open /go/src/github.com/metal3-io/baremetal-operator/hack/golint.sh ``` Upon successful execution, you should see the following output. I already had all the images available from a previous run, you might see the images getting downloaded if you're running for the very first time. ```bash IS_CONTAINER=false CONTAINER_RUNTIME=docker [ false != false ] docker run --rm --env IS_CONTAINER=TRUE --volume /home/noor/go/src/github.com/metal3-io/baremetal-operator:/go/src/github.com/metal3-io/baremetal-operator:ro,z\ --entrypoint sh --workdir /go/src/github.com/metal3-io/baremetal-operator\ quay.io/metal3-io/golint:latest /go/src/github.com/metal3-io/baremetal-operator/hack/golint.sh IS_CONTAINER=TRUE CONTAINER_RUNTIME=podman [ TRUE != false ] export XDGCACHEHOME=/tmp/.cache make lint which golint 2>&1 >/dev/null || make OPATH/bin/golint find ./pkg ./cmd -type f -name \*.go |grep -v zz | xargs -L1 golint -setexit_status ``` For testing without the hack scripts, make sure you install the latest development tools using ``go get``, e-g ```bash go get golang.org/x/lint/golint ``` This ensures that the linters you have locally and the ones running in the CI are matched and helps avoid inconsistencies. Happy coding!
Project: Rundeck (Provisioning / Automation & Configuration)
File: design.md

Client API Components: Tree - root or subtree which can store content Path - address in a tree PathItem - addressable location in the content tree Directory - path which contains other directories or resources Resource - content item stored in the tree Storage SPI ContentFilter - can intercept reads/writes to the tree and modify content Configure a Tree by composing storage SPI implementations TreeConfiguration - defines a configuration of TreeStorage and ContentFilter TreeBuilder - builds a configuration into a Tree
Project: KICS (Provisioning / Security & Compliance)
File: e7530c3c-b7cf-4149-8db9-d037a0b5268e.md

title: Elasticsearch Without IAM Authentication hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: e7530c3c-b7cf-4149-8db9-d037a0b5268e Query name: Elasticsearch Without IAM Authentication Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Access Control URL: AWS Elasticsearch should ensure IAM Authentication<br> ```tf title="Positive test num. 1 - tf file" hl_lines="1" resource "awselasticsearchdomain" "example" { domain_name = "tf-test" elasticsearch_version = "2.3" } resource "awselasticsearchdomain_policy" "main" { domainname = awselasticsearchdomain.example.domainname access_policies = <<POLICIES { "Version": "2012-10-17", "Statement": [ { "Action": "es:*", "Principal": "*", "Effect": "Allow", "Condition": { "IpAddress": {"aws:SourceIp": "127.0.0.1/32"} }, "Resource": "${awselasticsearchdomain.example.arn}/*" } ] } POLICIES } ``` ```tf title="Positive test num. 2 - tf file" hl_lines="1" resource "awselasticsearchdomain" "example2" { domain_name = "tf-test" elasticsearch_version = "2.3" } resource "awselasticsearchdomain_policy" "main2" { domainname = awselasticsearchdomain.example2.domainname access_policies = <<POLICIES { "Version": "2012-10-17", "Statement": [ { "Action": "es:*", "Effect": "Allow", "Condition": { "IpAddress": {"aws:SourceIp": "127.0.0.1/32"} }, "Resource": "${awselasticsearchdomain.example2.arn}/*" } ] } POLICIES } ``` ```tf title="Negative test num. 1 - tf file" resource "awselasticsearchdomain" "negativee" { domain_name = "tf-test" elasticsearch_version = "2.3" } resource "awselasticsearchdomain_policy" "main8" { domainname = awselasticsearchdomain.negativee.domainname access_policies = <<POLICIES { "Version": "2012-10-17", "Statement": [ { "Action": "es:*", "Principal" : { "AWS": [ "arn:aws:iam::123456789012:root", "arn:aws:iam::555555555555:root" ] }, "Effect": "Allow", "Condition": { "IpAddress": {"aws:SourceIp": "127.0.0.1/32"} }, "Resource": "${awselasticsearchdomain.negativee.arn}/*" } ] } POLICIES } ```
Project: KubeBlocks by ApeCloud (App Definition and Development / Database)
File: kbcli_bench_pgbench_prepare.md

title: kbcli bench pgbench prepare Prepare pgbench test data for a PostgreSQL cluster ``` kbcli bench pgbench prepare [ClusterName] [flags] ``` ``` kbcli bench pgbench prepare pgcluster --database postgres --user xxx --password xxx --scale 100 ``` ``` -h, --help help for prepare --scale int The scale factor to use for pgbench (default 1) ``` ``` --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 --database string database name --disable-compression If true, opt-out of response compression for all requests to the server --host string the host of database --insecure-skip-tls-verify If true, the server's certificate will not be checked for validity. This will make your HTTPS connections insecure --kubeconfig string Path to the kubeconfig file to use for CLI requests. --match-server-version Require server version to match client version -n, --namespace string If present, the namespace scope for this CLI request --password string the password of database --port int the port of database --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 user of database ``` - Run pgbench against a PostgreSQL cluster
Project: KICS (Provisioning / Security & Compliance)
File: 081069cb-588b-4ce1-884c-2a1ce3029fe5.md

title: CloudWatch Metrics Disabled hide: toc: true navigation: true <style> .highlight .hll { background-color: #ff171742; } .md-content { max-width: 1100px; margin: 0 auto; } </style> Query id: 081069cb-588b-4ce1-884c-2a1ce3029fe5 Query name: CloudWatch Metrics Disabled Platform: Terraform Severity: <span style="color:#ff7213">Medium</span> Category: Observability URL: Checks if CloudWatch Metrics is Enabled<br> ```tf title="Positive test num. 1 - tf file" hl_lines="8 18" resource "awsapigatewaymethodsettings" "positive1" { restapiid = awsapigatewayrestapi.test.id stagename = awsapigatewaystage.test.stage_name methodpath = "${awsapigatewayresource.test.pathpart}/${awsapigatewaymethod.test.http_method}" settings { metrics_enabled = false logging_level = "INFO" } } resource "awsapigatewaymethodsettings" "positive2" { restapiid = awsapigatewayrestapi.test.id stagename = awsapigatewaystage.test.stage_name methodpath = "${awsapigatewayresource.test.pathpart}/${awsapigatewaymethod.test.http_method}" settings { logging_level = "INFO" } } ``` ```tf title="Negative test num. 1 - tf file" resource "awsapigatewaymethodsettings" "negative1" { restapiid = awsapigatewayrestapi.test.id stagename = awsapigatewaystage.test.stage_name methodpath = "${awsapigatewayresource.test.pathpart}/${awsapigatewaymethod.test.http_method}" settings { metrics_enabled = true logging_level = "INFO" } } ```
Project: Juju (Provisioning / Automation & Configuration)
File: third-party-go-clients.md

This describes an approach to allow third party Go codebases to drive Juju. At a high level it works like this. Create a connector instance, telling it how to connect to a Juju controller and how to provide authentication credentials. Use this connector instance to obtain a connection instance. Get a facade client from the connection. Use the facade client to make one or more requests. The `github.com/juju/juju/api/connector` package defines a `Connector` interface. ```golang type Connector interface { Connect(...api.DialOption) (api.Connection, error) } ``` Its only purpose is to create instances of `api.Connection` that can later be used to talk to a given Juju controller with a given set of credentials. There are currently two ways to obtain a `Connector` instance. If one knows the how to contact a controller, and some juju user credentials (e.g. username and password) it is possible to obtain a connector like this. ```golang import "github.com/juju/juju/api/connector" ``` ```golang connr, err := connector.NewSimple(connector.SimpleConfig{ ControllerAddresses: []string{"10.225.205.241:17070"}, CaCert: "...", Username: "jujuuser", Password: "password1", }) ``` There can be an error if the config is not valid (e.g. no controller address specified). If a client store is available on the filesystem, it is possible to use it to configure the connector. ```golang import "github.com/juju/juju/api/connector" ``` ```golang connr, err := connector.NewClientStore(connector.ClientStoreConfig{ ControllerName: "overlord", }) ``` The above will try to find a client store in the default location. It is also possible to pass in a custom value (see `clientstoreconnector.go` for details). Once we have a connector, it's easy to make requests. ```golang import ( "encoding/json" "github.com/juju/juju/api/connector" "github.com/juju/juju/api/client/client" ) ``` ```golang // Get a connection conn, err := connr.Connect() if err != nil { log.Fatalf("Error opening connection: %s", err) } defer conn.Close() // Get a Client facade client client := apiclient.NewClient(conn) // Call the Status endpoint of the client facade status, err := client.Status(nil) if err != nil { log.Fatalf("Error requesting status: %s", err) } // Print to stdout. b, err := json.MarshalIndent(status, "", " ") if err != nil { log.Fatalf("Error marshalling response: %s", err) } fmt.Printf("%s\n", b) ``` When to reuse a connection, when to create a new one? How to find the useful endpoints?
Project: YugabyteDB (App Definition and Development / Database)
File: set_session_authorization,reset_session_authorization.diagram.md

<svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="548" height="70" viewbox="0 0 548 70"><path class="connector" d="M0 22h15m43 0h30m75 0h20m-105 25q0 5 5 5h5m59 0h21q5 0 5-5m-100-25q5 0 5 5v33q0 5 5 5h85q5 0 5-5v-33q0-5 5-5m5 0h10m75 0h10m121 0h30m84 0h20m-119 0q5 0 5 5v20q0 5 5 5h5m75 0h14q5 0 5-5v-20q0-5 5-5m5 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="15" y="5" width="43" height="25" rx="7"/><text class="text" x="25" y="22">SET</text><rect class="literal" x="88" y="5" width="75" height="25" rx="7"/><text class="text" x="98" y="22">SESSION</text><rect class="literal" x="88" y="35" width="59" height="25" rx="7"/><text class="text" x="98" y="52">LOCAL</text><rect class="literal" x="193" y="5" width="75" height="25" rx="7"/><text class="text" x="203" y="22">SESSION</text><rect class="literal" x="278" y="5" width="121" height="25" rx="7"/><text class="text" x="288" y="22">AUTHORIZATION</text><a xlink:href="../../../syntaxresources/grammardiagrams#role-name"><rect class="rule" x="429" y="5" width="84" height="25"/><text class="text" x="439" y="22">role_name</text></a><rect class="literal" x="429" y="35" width="75" height="25" rx="7"/><text class="text" x="439" y="52">DEFAULT</text><polygon points="544,29 548,29 548,15 544,15" style="fill:black;stroke-width:0"/></svg> <svg class="rrdiagram" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg" width="305" height="35" viewbox="0 0 305 35"><path class="connector" d="M0 22h15m59 0h10m75 0h10m121 0h15"/><polygon points="0,29 5,22 0,15" style="fill:black;stroke-width:0"/><rect class="literal" x="15" y="5" width="59" height="25" rx="7"/><text class="text" x="25" y="22">RESET</text><rect class="literal" x="84" y="5" width="75" height="25" rx="7"/><text class="text" x="94" y="22">SESSION</text><rect class="literal" x="169" y="5" width="121" height="25" rx="7"/><text class="text" x="179" y="22">AUTHORIZATION</text><polygon points="301,29 305,29 305,15 301,15" style="fill:black;stroke-width:0"/></svg>
Project: Dragonfly (Provisioning / Container Registry)
File: dfcache_version.md

% DFCACHE(1) Version v2.1.0 | Frivolous "Dfcache" Documentation dfcache version show version Show the version details of dragonfly. ```shell dfcache version [flags] ``` ```shell -i, --cid string content or cache ID, e.g. sha256 digest of the content --config string the path of configuration file with yaml extension name, default is /etc/dragonfly/dfcache.yaml, it can also be set by env var: DFCACHE_CONFIG --console whether logger output records to the stdout --jaeger string jaeger endpoint url, like: http://localhost:14250/api/traces --logdir string Dfcache log directory --pprof-port int listen port for pprof, 0 represents random port (default -1) --service-name string name of the service for tracer (default "dragonfly-dfcache") -t, --tag string different tags for the same cid will be recognized as different files in P2P network --timeout duration Timeout for this cache operation, 0 is infinite --verbose whether logger use debug level --workhome string Dfcache working directory -h, --help help for version ``` - the P2P cache client of dragonfly
Project: FOSSA (Provisioning / Security & Compliance)
File: nimble.md

When developing in , nimble is used to manage dependencies. | Strategy | Direct Deps | Transitive Deps | Edges | Classifies Dev Dependencies | Container Scanning | | -- | | | | | | | nimble.lock and `nimble dump` | :whitecheckmark: | :whitecheckmark: | :whitecheckmark: | :x: | :x: | | nimble.lock | :warning: | :whitecheckmark: | :whitecheckmark: | :x: | :whitecheckmark: | Find a file named `nimble.lock`. Parse `nimble.lock` to identify dependencies and edges among them. Perform `nimble dump --json` to identify direct dependencies. Limitation: Dependencies downloaded from mercurial are not reported. When `nimble dump --json` fails, any dependencies without incoming edge is considered to be a direct dependency Execute `nimble init` to create a new project or create `nim.nimble` manually: Example `nim.nimble`: ```nim version = "0.1.0" author = "User" description = "A new awesome nimble package" license = "MIT" srcDir = "src" installExt = @["nim"] bin = @["nim"] requires "nim >= 1.6.0" requires "jester >= 0.4.1 & < 0.5.0" ``` Execute `nimble lock` to install and pin dependencies - this will create (or modify) the `nimble.lock` file. Execute `fossa analyze -o` on the project to print analyzed dependency graphing (this will not upload any analysis to any endpoint) > If you are using an on older version of Nim, you may need to do following: > Perform: `choosenim 1.6.0` > Perform: `nimble install https://github.com/nim-lang/nimble@\#head` (get latest nimble or any version after lock file support!) You can explicitly specify an analysis target in `.fossa.yml` file. The example below will exclude all analysis targets except for the composer. ```yaml version: 3 targets: only: type: nimble ```
Project: KubeVela (App Definition and Development / Application Definition & Image Build)
File: sidecar.eg.md

```yaml apiVersion: core.oam.dev/v1beta1 kind: Application metadata: name: vela-app-with-sidecar spec: components: name: log-gen-worker type: worker properties: image: busybox cmd: /bin/sh -c > i=0; while true; do echo "$i: $(date)" >> /var/log/date.log; i=$((i+1)); sleep 1; done volumes: name: varlog mountPath: /var/log type: emptyDir traits: type: sidecar properties: name: count-log image: busybox cmd: [ /bin/sh, -c, 'tail -n+1 -f /var/log/date.log'] volumes: name: varlog path: /var/log ```
Project: StarRocks (App Definition and Development / Database)
File: DROP_REPOSITORY.md

displayed_sidebar: "English" Deletes a repository. Repositories are used to store data snapshots for data backup and restoration. CAUTION Only root user and superuser can delete a repository. This operation only deletes the mapping of the repository in StarRocks, and does not delete the actual data. You need to delete it manually in the remote storage system. After deletion, you can map to that repository again by specifying the same remote storage system path. ```SQL DROP REPOSITORY <repository_name> ``` | Parameter | Description | | | - | | repository_name | Name of the repository to be deleted. | Example 1: deletes a repository named `oss_repo`. ```SQL DROP REPOSITORY `oss_repo`; ```