### Install Grafbase Gateway Source: https://grafbase.com/docs/gateway/installation Installs the Grafbase Gateway by downloading and executing a script from the Grafbase website. This is the primary method for initial setup. ```bash curl -fsSL https://grafbase.com/downloads/gateway | bash ``` -------------------------------- ### Install Grafbase Gateway Source: https://grafbase.com/docs/gateway/configuration Installs the Grafbase Gateway by downloading and executing a script from the Grafbase website. This is the primary method for initial setup. ```bash curl -fsSL https://grafbase.com/downloads/gateway | bash ``` -------------------------------- ### Kubernetes Documentation Navigation Structure Source: https://kubernetes.io/docs/concepts/containers/images/ This entry details the hierarchical structure of the Kubernetes documentation navigation, including links to getting started, setup, and specific installation guides. ```APIDOC Kubernetes Documentation: - Getting started: /docs/setup/ - Learning environment: /docs/setup/learning-environment/ - Production environment: /docs/setup/production-environment/ - Container Runtimes: /docs/setup/production-environment/container-runtimes/ - Installing Kubernetes with deployment tools: /docs/setup/production-environment/tools/ - Bootstrapping clusters with kubeadm: /docs/setup/production-environment/tools/kubeadm/ - Installing kubeadm: /docs/setup/production-environment/tools/kubeadm/install-kubeadm/ - Troubleshooting kubeadm: /docs/setup/production-environment/tools/kubeadm/troubleshooting-kubeadm/ - Creating a cluster with kubeadm: /docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ - Customizing components with the kubeadm API: /docs/setup/production-environment/tools/kubeadm/control-plane-flags/ - Options for Highly Available Topology: /docs/setup/production-environment/tools/kubeadm/ha-topology/ - Creating Highly Available Clusters with kubeadm: /docs/setup/production-environment/tools/kubeadm/high-availability/ - Set up a High Availability etcd Cluster with kubeadm: /docs/setup/production-environment/tools/kubeadm/setup-ha-etcd-with-kubeadm/ - Configuring each kubelet in your cluster using kubeadm: /docs/setup/production-environment/tools/kubeadm/kubelet-integration/ ``` -------------------------------- ### Kubeadm Installation and Cluster Creation Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ This section details the process of installing and using kubeadm to bootstrap Kubernetes clusters. It covers installing kubeadm itself, troubleshooting common issues, creating clusters, and configuring highly available topologies. ```APIDOC Kubernetes Cluster Setup with Kubeadm: Installing kubeadm: Description: Steps to install the kubeadm command-line tool on your nodes. Usage: Follow OS-specific package manager instructions. Troubleshooting kubeadm: Description: Guidance on resolving common problems encountered during kubeadm operations. Topics: Network configuration, component failures, certificate issues. Creating a cluster with kubeadm: Description: Commands and configurations to initialize a control-plane node and join worker nodes to form a cluster. Key Commands: kubeadm init [flags] kubeadm join [flags] Customizing components with the kubeadm API: Description: Advanced configuration options for cluster components using the kubeadm API. Parameters: Control plane flags, etcd configuration. Options for Highly Available Topology: Description: Overview of different architectural choices for building highly available Kubernetes clusters. Creating Highly Available Clusters with kubeadm: Description: Step-by-step guide for setting up a production-ready, highly available Kubernetes cluster using kubeadm. Set up a High Availability etcd Cluster with kubeadm: Description: Specific instructions for configuring a resilient etcd cluster, which is critical for HA Kubernetes deployments. ``` -------------------------------- ### Install Grafbase Gateway Source: https://grafbase.com/docs/self-hosted-gateway Installs the Grafbase Gateway by downloading and executing a script from the Grafbase website. This is the primary method for initial setup. ```bash curl -fsSL https://grafbase.com/downloads/gateway | bash ``` -------------------------------- ### Launch Grafbase Gateway Source: https://grafbase.com/guides/implementing-a-gateway-resolver-extension Command to start the Grafbase gateway. It requires specifying the federated schema file and the configuration file (`grafbase.toml`) that includes the extension setup. ```bash grafbase-gateway --schema federated-schema.graphql --config grafbase.toml ``` -------------------------------- ### Kubernetes Ingress Resource Backend Example Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ Demonstrates a Kubernetes Ingress resource configured with a `Resource` backend. This backend points to another Kubernetes resource (like `StorageBucket`) within the same namespace, often used for static assets. It shows the `apiGroup`, `kind`, and `name` for the backend resource. ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: ingress-resource-backend spec: defaultBackend: resource: apiGroup: k8s.example.com kind: StorageBucket name: static-assets rules: - http: paths: - path: /icons pathType: ImplementationSpecific backend: resource: apiGroup: k8s.example.com kind: StorageBucket name: icon-assets ``` -------------------------------- ### Kubernetes Ingress `kubectl describe` Output Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ Shows the output of `kubectl describe ingress` for the example Ingress. It details the Ingress's default backend, rules, host, path, and associated backend resources, providing a structured view of the Ingress configuration. ```APIDOC kubectl describe ingress ingress-resource-backend Name: ingress-resource-backend Namespace: default Address: Default backend: APIGroup: k8s.example.com, Kind: StorageBucket, Name: static-assets Rules: Host Path Backends ---- * /icons APIGroup: k8s.example.com, Kind: StorageBucket, Name: icon-assets Annotations: Events: ``` -------------------------------- ### Kubernetes Minimal Ingress Resource Example Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ This YAML defines a basic Kubernetes Ingress resource. It specifies the Ingress class, a rewrite target annotation, and a rule to route traffic from /testpath to the test service on port 80. It requires a running Ingress controller configured with nginx-example class. ```yaml apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: minimal-ingress annotations: nginx.ingress.kubernetes.io/rewrite-target: / spec: ingressClassName: nginx-example rules: - http: paths: - path: /testpath pathType: Prefix backend: service: name: test port: number: 80 ``` -------------------------------- ### OpenTelemetry Documentation Structure Source: https://opentelemetry.io/docs/concepts/signals/baggage/ This entry details the hierarchical structure of the OpenTelemetry documentation, covering core concepts, getting started guides, demos, and specific instrumentation topics. ```APIDOC OpenTelemetry Documentation: - Overview: - Docs (/docs/) - Ecosystem (/ecosystem/) - Status (/status/) - Community (/community/) - Training (/training/) - Blog (/blog/) - Concepts: - What is OpenTelemetry? (/docs/what-is-opentelemetry/) - Getting Started: - Dev (/docs/getting-started/dev/) - Ops (/docs/getting-started/ops/) - Concepts Overview (/docs/concepts/) - Observability primer (/docs/concepts/observability-primer/) - Context propagation (/docs/concepts/context-propagation/) - Signals: - Traces (/docs/concepts/signals/traces/) - Metrics (/docs/concepts/signals/metrics/) - Logs (/docs/concepts/signals/logs/) - Baggage (/docs/concepts/signals/baggage/) - Instrumentation: - Zero-code (/docs/concepts/instrumentation/zero-code/) - Code-based (/docs/concepts/instrumentation/code-based/) - Libraries (/docs/concepts/instrumentation/libraries/) - Components (/docs/concepts/components/) - Semantic Conventions (/docs/concepts/semantic-conventions/) - Resources (/docs/concepts/resources/) - Instrumentation scope (/docs/concepts/instrumentation-scope/) - Sampling (/docs/concepts/sampling/) - Distributions (/docs/concepts/distributions/) - Glossary (/docs/concepts/glossary/) - Demo: - Demo Docs (/docs/demo/) - Architecture (/docs/demo/architecture/) - Collector Data Flow Dashboard (/docs/demo/collector-data-flow-dashboard/) - Development (/docs/demo/development/) - Docker deployment (/docs/demo/docker-deployment/) - Feature Flags: - Diagnosing memory leaks (/docs/demo/feature-flags/recommendation-cache/) - Forking (/docs/demo/forking/) - Kubernetes deployment (/docs/demo/kubernetes-deployment/) - Requirements: - Application (/docs/demo/requirements/application/) - Architecture (/docs/demo/requirements/architecture/) - OTel Requirements (/docs/demo/requirements/opentelemetry/) - System (/docs/demo/requirements/system/) - Screenshots (/docs/demo/screenshots/) - Services: - Accounting (/docs/demo/services/accounting/) - Ad (/docs/demo/services/ad/) - Cart (/docs/demo/services/cart/) - Checkout (/docs/demo/services/checkout/) - Currency (/docs/demo/services/currency/) - Email (/docs/demo/services/email/) - Fraud Detection (/docs/demo/services/fraud-detection/) - Frontend (/docs/demo/services/frontend/) - Frontend Proxy (Envoy) (/docs/demo/services/frontend-proxy/) - Image Provider (/docs/demo/services/image-provider/) - Kafka (/docs/demo/services/kafka/) - Load Generator (/docs/demo/services/load-generator/) ``` -------------------------------- ### Install Authenticated Extension (Bash) Source: https://grafbase.com/extensions/authenticated Command to install the Grafbase Authenticated extension before starting the gateway. ```bash grafbase extension install ``` -------------------------------- ### Kubernetes Documentation Page Structure Source: https://kubernetes.io/docs/concepts/containers/images/ Markdown structure for creating new pages within the Kubernetes documentation. It includes front matter for title, linkTitle, weight, and description, followed by content headings and instructions for editing and committing. ```markdown --- title: "Long Page Title" linkTitle: "Short Nav Title" weight: 100 description: >- Page description for heading and indexes. --- ## Heading Edit this template to create your new page. * Give it a good name, ending in `.md` - e.g. `getting-started.md` * Edit the "front matter" section at the top of the page (weight controls how its ordered amongst other pages in the same directory; lowest number first). * Add a good commit message at the bottom of the page (<80 characters; use the extended description field for more detail). * Create a new branch so you can preview your new file and request a review via Pull Request. ``` -------------------------------- ### Install Requires Scopes Extension (Bash) Source: https://grafbase.com/extensions/requires-scopes Installs the 'requires-scopes' extension using the Grafbase CLI. This command should be run before starting the Grafbase gateway. ```bash grafbase extension install ``` -------------------------------- ### Grafbase Gateway Configuration Example Source: https://grafbase.com/guides/implementing-gateway-hooks Demonstrates typical configuration values and file paths used when implementing custom gateway hooks. This snippet illustrates how extensions and build paths might be specified. ```javascript extensions.my-hooks path = "./build" extensions.my-hooks.config my_key = "my_value" ``` -------------------------------- ### Kubernetes ReplicationController Manifest Example Source: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/ This YAML manifest defines a Kubernetes ReplicationController named 'nginx' configured to run three replicas of the nginx web server. It specifies the desired number of replicas, a selector to identify pods managed by this controller, and a pod template defining the container image and ports. ```yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx spec: replicas: 3 selector: app: nginx template: metadata: name: nginx labels: app: nginx spec: containers: - name: nginx image: nginx ports: - containerPort: 80 ``` -------------------------------- ### Project Base Styles and Media Queries Source: https://grafbase.com/docs/gateway/installation Sets up base HTML and body styles, including background color, text color, and font sizes. It also includes responsive adjustments for font sizes based on screen width and applies animations to specific classes. ```css html{ background-color:var(--colors-bg1) } body{ color:var(--colors-text1); font-size:var(--fontSizes-sm); line-height:var(--lineHeights-sm) } @media (min-width: 768px){ body{ font-size:var(--fontSizes-md); line-height:var(--lineHeights-md) } } /* Animation application */ .k-feVUdh { animation: k-feVUdh 0.3s ease-out forwards; } .k-bAOeel { animation: k-bAOeel 0.5s ease-out forwards; } .k-daNevH { animation: k-daNevH 0.3s ease-out forwards; } .k-fvyGIa { animation: k-fvyGIa 0.3s ease-out forwards; } .k-ftcNPK { animation: k-ftcNPK 0.3s ease-out forwards; } .k-hbaHED { animation: k-hbaHED 0.3s ease-out forwards; } ``` -------------------------------- ### Install Grafbase Extensions Source: https://grafbase.com/extensions/authenticated Executes the Grafbase CLI command to install configured extensions, including the authenticated extension, before starting the gateway. ```shell grafbase extension install ``` -------------------------------- ### Install Specific Grafbase CLI Version Source: https://github.com/grafbase/install-grafbase-cli Installs a specific version of the Grafbase CLI by providing the `version` input to the `grafbase/install-grafbase-cli` GitHub Action. Example uses version 0.82.4. ```yaml - name: Install Grafbase CLI uses: grafbase/install-grafbase-cli@v1 with: version: 0.82.4 ``` -------------------------------- ### Install and Create Kind Cluster Source: https://kind.sigs.k8s.io/ Installs the kind CLI using Go and creates a local Kubernetes cluster. Requires Go 1.17+ and a container runtime like Docker. ```shell go install sigs.k8s.io/kind@v0.29.0 kind create cluster ``` -------------------------------- ### Helm Install Dry Run Output Source: https://helm.sh/docs/chart_template_guide/values_files/ Example output from `helm install --dry-run --debug` showing the computed values, including values defined in `values.yaml` and how they are rendered into Kubernetes manifests. ```helm install.go:158: [debug] Original chart version: "" install.go:175: [debug] CHART PATH: /home/bagratte/src/playground/mychart NAME: geared-marsupi LAST DEPLOYED: Wed Feb 19 23:21:13 2020 NAMESPACE: default STATUS: pending-install REVISION: 1 TEST SUITE: None USER-SUPPLIED VALUES: {} COMPUTED VALUES: favoriteDrink: coffee HOOKS: MANIFEST: --- # Source: mychart/templates/configmap.yaml apiVersion: v1 kind: ConfigMap metadata: name: geared-marsupi-configmap data: myvalue: "Hello World" drink: coffee ``` -------------------------------- ### Get Started with AWS X-Ray Source: https://aws.amazon.com/xray/ Begin your journey with AWS X-Ray. This entry provides a general starting point and a link to the main AWS website for further exploration. ```text Get started with AWS X-Ray [Learn more](https://aws.amazon.com) ``` -------------------------------- ### Project Base Styles and Media Queries Source: https://grafbase.com/docs/self-hosted-gateway Sets up base HTML and body styles, including background color, text color, and font sizes. It also includes responsive adjustments for font sizes based on screen width and applies animations to specific classes. ```css html{ background-color:var(--colors-bg1) } body{ color:var(--colors-text1); font-size:var(--fontSizes-sm); line-height:var(--lineHeights-sm) } @media (min-width: 768px){ body{ font-size:var(--fontSizes-md); line-height:var(--lineHeights-md) } } /* Animation application */ .k-feVUdh { animation: k-feVUdh 0.3s ease-out forwards; } .k-bAOeel { animation: k-bAOeel 0.5s ease-out forwards; } .k-daNevH { animation: k-daNevH 0.3s ease-out forwards; } .k-fvyGIa { animation: k-fvyGIa 0.3s ease-out forwards; } .k-ftcNPK { animation: k-ftcNPK 0.3s ease-out forwards; } .k-hbaHED { animation: k-hbaHED 0.3s ease-out forwards; } ``` -------------------------------- ### Kubernetes Version and Language Selectors Source: https://kubernetes.io/docs/concepts/containers/images/ This entry describes the functionality for selecting different versions of Kubernetes documentation and switching between supported languages. ```APIDOC Versions: - Release Information: /releases - v1.33: https://kubernetes.io/docs/concepts/containers/images/ - v1.32: https://v1-32.docs.kubernetes.io/docs/concepts/containers/images/ - v1.31: https://v1-31.docs.kubernetes.io/docs/concepts/containers/images/ - v1.30: https://v1-30.docs.kubernetes.io/docs/concepts/containers/images/ - v1.29: https://v1-29.docs.kubernetes.io/docs/concepts/containers/images/ Languages: - English: # (Current Language) - 中文 (Chinese): /zh-cn/docs/concepts/containers/images/ - Français (French): /fr/docs/concepts/containers/images/ - Deutsch (German): /de/docs/concepts/containers/images/ - Bahasa Indonesia (Indonesian): /id/docs/concepts/containers/images/ - Italiano (Italian): /it/docs/concepts/containers/images/ - 日本語 (Japanese): /ja/docs/concepts/containers/images/ - 한국어 (Korean): /ko/docs/concepts/containers/images/ - Português (Portuguese): /pt-br/docs/concepts/containers/images/ - Русский (Russian): /ru/docs/concepts/containers/images/ - हिन्दी (Hindi): /hi/docs/concepts/ - Polski (Polish): /pl/docs/concepts/ - Español (Spanish): /es/docs/concepts/ - Українська (Ukrainian): /uk/docs/concepts/ - Tiếng Việt (Vietnamese): /vi/docs/concepts/ - বাংলা (Bengali): /bn/docs/concepts/ ``` -------------------------------- ### Execute Grafbase Persisted Query via GET Source: https://grafbase.com/docs/gateway/performance/automatic-persisted-queries Demonstrates how to execute a Grafbase persisted query using a GET request. Fields must be passed as query parameters, with their values first JSON-encoded. This example shows how to retrieve data using a persisted query hash. ```shell curl --get 'http://localhost:4000/graphql' \ --data-urlencode 'extensions={"persistedQuery":{"version":1,"sha256Hash":"4ef8d269e7944ef2cd6554ecb3d73164546945cf935806933448905abec554e5"}}' ``` -------------------------------- ### Grafbase Extension Configuration Source: https://grafbase.com/extensions/oauth-protected-resource Configuration examples for Grafbase extensions, including installing the OAuth protected resource extension and setting its resource identifier. ```TOML # grafbase.toml [extensions.oauth-protected-resource] version = "0.1" ``` ```TOML # grafbase.toml [extensions.oauth-protected-resource.config.metadata] # Required - The resource identifier URL for this protected resource resource = "https://api.example.com" ``` -------------------------------- ### Example: Running Grafbase CLI Source: https://grafbase.com/docs/platform/schema-checks An example command demonstrating how to initiate a Grafbase CLI operation, likely for checking or linting schema files. ```bash $ grafbase check ``` -------------------------------- ### Kubernetes Cluster Resources API Source: https://kubernetes.io/docs/concepts/containers/images/ Documentation for Kubernetes API resources that represent cluster-level entities, including Namespace, Node, Event, and APIService. ```APIDOC APIService v1: Description: Represents an API service that is part of the Kubernetes API aggregation layer. Purpose: Allows custom APIs to be integrated into the Kubernetes API. Related: N/A ComponentStatus v1: Description: Reports the status of Kubernetes components. Purpose: Provides health information about the control plane components. Related: N/A Event v1: Description: Represents an event that occurred in the cluster. Purpose: Records significant occurrences, such as pod scheduling or errors. Related: N/A IPAddress v1: Description: Represents an IP address resource. Purpose: Used for network configuration, often in conjunction with IPAM. Related: ServiceCIDR Lease v1: Description: Represents a lease for distributed coordination. Purpose: Used by components like the controller-manager for leader election. Related: LeaseCandidate LeaseCandidate v1beta1: Description: Represents a candidate for a lease. Purpose: Used in leader election processes. Related: Lease Namespace v1: Description: Represents a Kubernetes namespace. Purpose: Provides a mechanism for isolating groups of resources within a cluster. Related: N/A Node v1: Description: Represents a worker node in the Kubernetes cluster. Purpose: Manages the state and configuration of nodes. Related: N/A RuntimeClass v1: Description: Defines a runtime class for pods. Purpose: Allows pods to specify different container runtimes. Related: N/A ServiceCIDR v1: Description: Defines a CIDR range for services. Purpose: Configures the IP address pool for Kubernetes services. Related: IPAddress ``` -------------------------------- ### Applying and Describing Kubernetes Ingress Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ These shell commands are used to apply the Ingress configuration to a Kubernetes cluster and then inspect the created Ingress resource. 'kubectl apply' creates or updates the Ingress, while 'kubectl describe' shows detailed information about the Ingress, including its address and rules. ```shell kubectl apply -f service/networking/simple-fanout-example.yaml kubectl describe ingress simple-fanout-example ``` -------------------------------- ### Google Analytics Initialization Source: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/ Initializes Google Analytics tracking for the website. It checks for Do Not Track settings before sending data. ```javascript var dnt,doNotTrack=!1; if(!1&&(dnt=navigator.doNotTrack||window.doNotTrack||navigator.msDoNotTrack,doNotTrack=dnt=="1"||dnt=="yes"),!doNotTrack){ window.dataLayer=window.dataLayer||[]; function gtag(){ dataLayer.push(arguments); } gtag("js",new Date); gtag("config","G-JPP6RFM2BP"); } ``` -------------------------------- ### Project Base Styles and Media Queries Source: https://grafbase.com/docs/gateway/configuration Sets up base HTML and body styles, including background color, text color, and font sizes. It also includes responsive adjustments for font sizes based on screen width and applies animations to specific classes. ```css html{ background-color:var(--colors-bg1) } body{ color:var(--colors-text1); font-size:var(--fontSizes-sm); line-height:var(--lineHeights-sm) } @media (min-width: 768px){ body{ font-size:var(--fontSizes-md); line-height:var(--lineHeights-md) } } /* Animation application */ .k-feVUdh { animation: k-feVUdh 0.3s ease-out forwards; } .k-bAOeel { animation: k-bAOeel 0.5s ease-out forwards; } .k-daNevH { animation: k-daNevH 0.3s ease-out forwards; } .k-fvyGIa { animation: k-fvyGIa 0.3s ease-out forwards; } .k-ftcNPK { animation: k-ftcNPK 0.3s ease-out forwards; } .k-hbaHED { animation: k-hbaHED 0.3s ease-out forwards; } ``` -------------------------------- ### Grafbase Configuration Example Source: https://github.com/grafbase/grafbase/tree/main/examples/authorization This snippet showcases the Grafbase configuration file (grafbase.toml) used to define custom authentication and authorization logic, including extension setup and schema definitions. ```toml # grafbase.toml # This file is a placeholder. Actual content would define extensions and schema. ``` -------------------------------- ### Launch Grafbase Gateway Source: https://grafbase.com/guides/implementing-a-gateway-resolver-extension Launches the Grafbase gateway service, specifying the schema file and the configuration file. This command starts the gateway with the newly added extension. ```bash grafbase-gateway --schema federated-schema.graphql --config grafbase.toml ``` -------------------------------- ### Helm OCI Subcommands Usage Examples Source: https://helm.sh/docs/topics/registries/ Demonstrates the usage of various Helm subcommands with OCI-based chart references, including pulling, showing, templating, installing, and upgrading charts from OCI registries. ```shell $ helm pull oci://localhost:5000/helm-charts/mychart --version 0.1.0 Pulled: localhost:5000/helm-charts/mychart:0.1.0 Digest: sha256:0be7ec9fb7b962b46d81e4bb74fdcdb7089d965d3baca9f85d64948b05b402ff ``` ```shell $ helm show all oci://localhost:5000/helm-charts/mychart --version 0.1.0 apiVersion: v2 appVersion: 1.16.0 description: A Helm chart for Kubernetes name: mychart ... ``` ```shell $ helm template myrelease oci://localhost:5000/helm-charts/mychart --version 0.1.0 --- # Source: mychart/templates/serviceaccount.yaml apiVersion: v1 kind: ServiceAccount ... ``` ```shell $ helm install myrelease oci://localhost:5000/helm-charts/mychart --version 0.1.0 NAME: myrelease LAST DEPLOYED: Wed Oct 27 15:11:40 2021 NAMESPACE: default STATUS: deployed REVISION: 1 NOTES: ... ``` ```shell $ helm upgrade myrelease oci://localhost:5000/helm-charts/mychart --version 0.2.0 Release "myrelease" has been upgraded. Happy Helming! NAME: myrelease LAST DEPLOYED: Wed Oct 27 15:12:05 2021 NAMESPACE: default STATUS: deployed REVISION: 2 NOTES: ... ``` -------------------------------- ### Kubernetes Authentication API Resources Source: https://kubernetes.io/docs/concepts/containers/images/ Documentation for Kubernetes API resources related to authentication, such as ServiceAccount, TokenRequest, TokenReview, and CertificateSigningRequest. These resources manage identity and authentication within the cluster. ```APIDOC ServiceAccount v1: Description: Represents a service account in Kubernetes. Purpose: Provides an identity for processes that run in Pods. Related: TokenRequest, TokenReview TokenRequest v1: Description: Creates a token for a specific service account. Purpose: Generates short-lived, auditable bearer tokens. Related: ServiceAccount, TokenReview TokenReview v1: Description: Evaluates a token to determine its authenticity and associated user information. Purpose: Used by API servers to authenticate requests. Related: ServiceAccount, TokenRequest CertificateSigningRequest v1: Description: Represents a certificate signing request. Purpose: Allows users to request certificates from the cluster's certificate authority. Related: ClusterTrustBundle ClusterTrustBundle v1beta1: Description: A collection of trust roots for validating signatures. Purpose: Used for distributing trust material across the cluster. Related: CertificateSigningRequest SelfSubjectReview v1: Description: Used to perform a self-review of the current user's authorization. Purpose: Allows a subject to determine their own permissions. Related: SelfSubjectAccessReview, SelfSubjectRulesReview ``` -------------------------------- ### Grafbase CLI Documentation Source: https://grafbase.com/docs/gateway/configuration/trusted-documents Documentation for the Grafbase Command Line Interface (CLI), covering installation and available commands. This section guides users on managing Grafbase projects and resources via the CLI. ```APIDOC Grafbase CLI Documentation: Installation: - Steps to install the Grafbase CLI. Commands: - Overview and usage of various Grafbase CLI commands. ``` -------------------------------- ### Kubernetes Service Resources Source: https://kubernetes.io/docs/tasks/tools/ Documentation for Kubernetes service resources, including Services, Endpoints, Ingress, and IngressClasses. These resources are used for network communication and exposing applications. ```APIDOC Kubernetes Service Resources: Service v1: Description: Service is a REST resource that defines a logical set of Pods and a policy by which to access them. Endpoints v1: Description: Endpoints is a REST resource that represents a collection of endpoints, either from a Service or from a custom resource. EndpointSlice v1: Description: EndpointSlice represents a subset of the endpoints that belong to a Service. Ingress v1: Description: Ingress is a collection of rules that grant external HTTP(S) access to services in the cluster. IngressClass v1: Description: IngressClass represents a resource that defines a class of ingress controllers. ``` -------------------------------- ### Apollo Kotlin Query Fetching Example Source: https://www.apollographql.com/docs/kotlin/advanced/persisted-queries/ Demonstrates how to fetch data using a GraphQL query with Apollo Kotlin. It shows client setup and query execution. ```kotlin import com.apollographql.apollo3.ApolloClient import com.apollographql.apollo3.api.Optional // Assuming GetHeroQuery is generated from your schema // import com.example.GetHeroQuery // Example usage: // val apolloClient = ApolloClient.Builder().serverUrl("YOUR_GRAPHQL_ENDPOINT").build() // val query = GetHeroQuery(episode = Optional.Present("EMPIRE")) // val result = apolloClient.query(query).execute() // Placeholder for actual query execution logic fun fetchHeroData() { // val apolloClient = ApolloClient.Builder().serverUrl("YOUR_GRAPHQL_ENDPOINT").build() // val query = GetHeroQuery(episode = Optional.Present("EMPIRE")) // val result = apolloClient.query(query).execute() // println(result.data?.hero?.name) } ``` -------------------------------- ### Simple Server Example with Persisted Queries Source: https://relay.dev/docs/guides/persisted-queries/ Demonstrates integrating the `persistedQueries` middleware from `express-graphql-persisted-queries` into an Express.js server. This setup allows the server to efficiently handle GraphQL requests using pre-defined query maps. ```javascript import express from 'express'; import {graphqlHTTP} from 'express-graphql'; import {persistedQueries} from 'express-graphql-persisted-queries'; import queryMap from './path/to/queryMap.json'; const app = express(); app.use( '/graphql', persistedQueries({ queryMap, queryIdKey: 'doc_id', }), graphqlHTTP({schema}) ); ``` -------------------------------- ### Kubernetes Workload Resources Source: https://kubernetes.io/docs/tasks/tools/ Documentation for Kubernetes workload resources, covering Pods, Deployments, StatefulSets, Jobs, and more. These resources manage the lifecycle and execution of applications within a cluster. ```APIDOC Kubernetes Workload Resources: Pod v1: Description: An abstraction that represents a group of one or more containers (such as Docker containers), and the storage or network resources they share, and a specification for how to run the containers. Binding v1: Description: A reference to a particular resource, identified by a group, version, kind, and namespace. PodTemplate v1: Description: PodTemplate is a template for creating pods. ReplicationController v1: Description: ReplicationController ensures that a specified number of pod replicas are running at any given time. ReplicaSet v1: Description: ReplicaSet ensures that a specified number of pod replicas run at any given time. Deployment v1: Description: Deployment manages the declarative updates for Pods and ReplicaSets. StatefulSet v1: Description: StatefulSet manages stateful applications. It provides guarantees about the ordering and uniqueness of these applications. ControllerRevision v1: Description: ControllerRevision implements an immutable snapshot of the state of a particular ReplicaSet version. DaemonSet v1: Description: DaemonSet ensures that all (or some) Nodes run a copy of a Pod. Job v1: Description: Job creates one or more Pods, and continues to run them until a specified number of them successfully terminate. CronJob v1: Description: CronJob creates Jobs on a repeating schedule. HorizontalPodAutoscaler v1: Description: HorizontalPodAutoscaler automatically updates the number of pods in a replication controller, deployment, replica set or stateful set. HorizontalPodAutoscaler v2: Description: HorizontalPodAutoscaler automatically updates the number of pods in a replication controller, deployment, replica set or stateful set. PriorityClass v1: Description: PriorityClass defines the priority of a Pod. DeviceTaintRule v1alpha3: Description: DeviceTaintRule is a rule for tainting devices. ResourceClaim v1beta2: Description: ResourceClaim defines a request for resources. ResourceClaimTemplate v1beta2: Description: ResourceClaimTemplate is a template for creating ResourceClaims. ResourceSlice v1beta2: Description: ResourceSlice represents a slice of resources. ``` -------------------------------- ### IngressClass with Namespaced Parameters Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ Example of an IngressClass resource referencing namespaced parameters. The `spec.parameters.scope` is set to 'Namespace', requiring the `namespace` field to specify the location of the parameter resource. ```yaml --- apiVersion: networking.k8s.io/v1 kind: IngressClass metadata: name: external-lb-2 spec: controller: example.com/ingress-controller parameters: # The parameters for this IngressClass are specified in an # IngressParameter (API group k8s.example.com) named "external-config", # that's in the "external-configuration" namespace. scope: Namespace apiGroup: k8s.example.com kind: IngressParameter namespace: external-configuration name: external-config ``` -------------------------------- ### Kubernetes Documentation Sidebar Navigation Script Source: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/ A jQuery script used to manage the active state and visibility of navigation elements within the Kubernetes documentation sidebar. ```javascript $(function(){ $("#td-section-nav a").removeClass("active"); $("#td-section-nav #m-docs-concepts-workloads-controllers-replicationcontroller").addClass("active"); $("#td-section-nav #m-docs-concepts-workloads-controllers-replicationcontroller-li span").addClass("td-sidebar-nav-active-item"); $("#td-section-nav #m-docs-concepts-workloads-controllers-replicationcontroller").parents("li").addClass("active-path"); $("#td-section-nav li.active-path").addClass("show"); $("#td-section-nav li.active-path").children("input").prop("checked",!0); $("#td-section-nav #m-docs-concepts-workloads-controllers-replicationcontroller-li").siblings("li").addClass("show"); $("#td-section-nav #m-docs-concepts-workloads-controllers-replicationcontroller-li").children("ul").children("li").addClass("show"); $("#td-sidebar-menu").toggleClass("d-none"); }) ``` -------------------------------- ### Kubernetes Ingress API Reference Source: https://kubernetes.io/docs/concepts/services-networking/ingress/ Provides links to the official Kubernetes API reference documentation for Ingress and IngressClass resources. These references detail the structure, fields, and behavior of these networking objects within Kubernetes. ```APIDOC Kubernetes Ingress API Reference: URL: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-v1/ Description: Details the Ingress resource API, including its specification for routing HTTP and HTTPS traffic to services within a Kubernetes cluster. Kubernetes IngressClass API Reference: URL: https://kubernetes.io/docs/reference/kubernetes-api/service-resources/ingress-class-v1/ Description: Details the IngressClass resource API, which is used to specify a class of Ingress controllers, enabling different Ingress controllers to serve different Ingress resources. ``` -------------------------------- ### Initialize Resolver Extension Source: https://grafbase.com/guides/implementing-a-gateway-resolver-extension Command to create a new resolver extension project using the Grafbase CLI. This sets up the basic file structure for a resolver extension. ```Bash grafbase extension init --type resolver rest ``` -------------------------------- ### Kubernetes ReplicationController Spec Structure Source: https://kubernetes.io/docs/concepts/workloads/controllers/replicationcontroller/ Defines the structure of a Kubernetes ReplicationController's specification, including the required pod template and optional selector and replica count. ```APIDOC apiVersion: v1 kind: ReplicationController metadata: name: my-rc spec: replicas: 3 selector: app: my-app template: metadata: labels: app: my-app spec: containers: - name: nginx image: nginx ports: - containerPort: 80 ``` -------------------------------- ### Grafbase TOML Configuration Example Source: https://grafbase.com/blog/custom-authentication-and-authorization-in-graphql-federation Illustrates the structure of a grafbase.toml file, specifically showing how to configure extensions and guard settings, including environment variable usage. ```toml # grafbase.toml ["extensions.guard.config"] header_name = "Authorization" ``` -------------------------------- ### HTTP Request with Query String Example Source: https://datatracker.ietf.org/doc/html/rfc9421 Illustrates an HTTP GET request and the corresponding '@query' component value used in signature base lines. It shows how the query string, including percent-encoded characters, is captured. ```http GET /path?param=value&foo=bar&baz=bat%2Dman HTTP/1.1 Host: www.example.com ``` ```text "@query": ?param=value&foo=bar&baz=bat%2Dman ``` -------------------------------- ### Grafbase Dev Command and Configuration Source: https://context7_llms Demonstrates starting the Grafbase local development environment with various configurations, including graph references, subgraph overrides, introspection headers, schema paths, port selection, and WebAssembly hooks. It also shows how to enable the MCP server. ```bash grafbase dev --graph-ref my-org/my-graph@main ``` ```bash grafbase dev --graph-ref my-org/my-graph@main --config grafbase.toml ``` ```bash grafbase dev --graph-ref my-org/my-graph@main --port 4000 ``` -------------------------------- ### API Web Worker Crashing Error Source: https://grafbase.com/guides/installing-grafbase-enterprise-platform Example of an error log indicating the API web worker is crashing due to an inability to access an AWS S3 bucket. This often occurs during initial cluster setup. ```bash API web worker crashing due to not being able to access the AWS S3 bucket: ``` -------------------------------- ### GraphQL over WebSocket Protocol Examples Source: https://github.com/graphql/graphql-over-http/blob/main/rfcs/GraphQLOverWebSocket Illustrates common scenarios for using the GraphQL over WebSocket Protocol, including successful connection setup, handling timeouts, and streaming GraphQL operations. ```APIDOC GraphQLOverWebSocketProtocol Examples: Successful connection initialisation: Client -> Server: {"type": "connection_init"} Server -> Client: {"type": "connection_ack"} Connection initialisation timeout: Client -> Server: {"type": "connection_init"} (Server does not respond with connection_ack within timeout period) Client closes connection. Streaming operation: Client -> Server: {"type": "connection_init"} Server -> Client: {"type": "connection_ack"} Client -> Server: {"type": "subscribe", "id": "1", "payload": {"query": "subscription { count }"}} Server -> Client: {"type": "next", "id": "1", "payload": {"data": {"count": 1}}} Server -> Client: {"type": "next", "id": "1", "payload": {"data": {"count": 2}}} Server -> Client: {"type": "complete", "id": "1"} (Client may send complete if it no longer needs data) ``` -------------------------------- ### Grafbase Gateway - Installation Source: https://grafbase.com/docs/gateway/configuration/operation-limits Instructions for installing the Grafbase Gateway, a core component for deploying and managing GraphQL APIs with Grafbase. ```APIDOC Grafbase Gateway Installation: Endpoint: `/docs/gateway/installation` Description: Guides users through the process of installing the Grafbase Gateway, which acts as the entry point for GraphQL requests and handles routing, authentication, and other gateway functionalities. Prerequisites: - Node.js and npm/yarn installed. Installation Steps: - Typically involves using a package manager (npm, yarn, pnpm) to install the gateway package. - Configuration steps to set up the gateway for your specific project. Related Topics: - Gateway Extensions: `/docs/gateway/extensions` - Gateway Security: `/docs/gateway/security` ``` -------------------------------- ### Kubelet config.json for Registry Authentication Source: https://kubernetes.io/docs/concepts/containers/images/ Illustrates the structure of `config.json` used by Kubelet for dynamic registry credential providers. It shows how to specify authentication for root URLs and glob patterns, enabling flexible matching of registry paths. ```json { "auths": { "my-registry.example/images": { "auth": "…" }, "*.my-registry.example/images": { "auth": "…" } } } ``` ```json { "auths": { "my-registry.example/images": { "auth": "…" }, "my-registry.example/images/subpath": { "auth": "…" } } } ```