### Install RBAC for Watching All Namespaces Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.1.0/kubectl/readme.adoc Installs cluster-level role-based access control (RBAC) configurations, allowing the operator to watch all namespaces. This command uses `curl` and `sed` to download the YAML, substitute a placeholder, and apply it. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.1.0/kubectl/websphereliberty-app-rbac-watch-all.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Install WebSphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.1.0/kubectl/readme.adoc Deploys the WebSphere Liberty Operator to the specified namespace, configuring it to watch the designated namespace(s). This command uses `curl` and `sed` to fetch the operator manifest, substitute the watch namespace, and apply the deployment. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.1.0/kubectl/websphereliberty-app-operator.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -n ${OPERATOR_NAMESPACE} -f - ``` -------------------------------- ### Install RBAC for Watching Another Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.1.0/kubectl/readme.adoc Installs RBAC configurations with access limited to a specific namespace, allowing the operator to watch that particular namespace. It uses `curl` and `sed` to fetch, modify, and apply the RBAC configuration. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.1.0/kubectl/websphereliberty-app-rbac-watch-another.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Configure Operator Namespace and Watch Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.1.0/kubectl/readme.adoc Sets the namespace where the operator will run and the namespace(s) it will watch. Replace placeholders with actual namespace values. Ensure namespaces exist beforehand. ```sh OPERATOR_NAMESPACE= WATCH_NAMESPACE= ``` -------------------------------- ### Install WebSphere Liberty Application CRDs Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.1.0/kubectl/readme.adoc Installs the Custom Resource Definitions (CRDs) for WebSphereLibertyApplication and related day-2 operations resources. This is a one-time setup per cluster. ```sh kubectl apply -f https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.1.0/kubectl/websphereliberty-app-crd.yaml ``` -------------------------------- ### Install Required Packages for Performance Data Collection (Shell) Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home This shell command installs necessary packages (`procps-ng`, `net-tools`, `ncurses`, `hostname`) for performance data collection. It first checks for `yum` and falls back to `microdnf` if `yum` is not available, ensuring compatibility across different minimal UBI environments. ```Shell USER 0 RUN command -v yum && pkgcmd=yum || pkgcmd=microdnf && ($pkgcmd update -y && $pkgcmd install -y procps-ng net-tools ncurses hostname) USER 1001 ``` -------------------------------- ### Install Websphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.1/kubectl/readme.adoc Deploys the Websphere Liberty Operator to the specified namespace, configuring it to watch the designated namespace. Requires substituting the watch namespace. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.1/kubectl/websphereliberty-app-operator.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -n ${OPERATOR_NAMESPACE} -f - ``` -------------------------------- ### Install RBAC for Watching All Namespaces Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.2/kubectl/readme.adoc Installs cluster-level role-based access control for the operator to watch all namespaces. It fetches an RBAC configuration file, substitutes the operator namespace, and applies it. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.2/kubectl/websphereliberty-app-rbac-watch-all.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Install Websphere Liberty Application CRDs Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.1/kubectl/readme.adoc Installs the Custom Resource Definitions (CRDs) for WebsphereLibertyApplication, WebsphereLibertyTrace, and WebsphereLibertyDump. This is a one-time setup per cluster. ```sh kubectl apply -f https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.1/kubectl/websphereliberty-app-crd.yaml ``` -------------------------------- ### Install Websphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.0/kubectl/readme.adoc Deploys the Websphere Liberty Operator to the specified namespace, configuring it to watch the designated namespace. It uses curl to fetch the operator manifest, substitutes the watch namespace, and applies it. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.0/kubectl/websphereliberty-app-operator.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -n ${OPERATOR_NAMESPACE} -f - ``` -------------------------------- ### Install Websphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.2/kubectl/readme.adoc Deploys the Websphere Liberty Operator to the specified namespace. It fetches the operator configuration, substitutes the watch namespace, and applies it to the cluster. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.2/kubectl/websphereliberty-app-operator.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -n ${OPERATOR_NAMESPACE} -f - ``` -------------------------------- ### Install Websphere Liberty Application CRDs Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.0/kubectl/readme.adoc Installs the Custom Resource Definitions (CRDs) for WebsphereLibertyApplication, WebsphereLibertyTrace, and WebsphereLibertyDump. This is a one-time setup per cluster. ```sh kubectl apply -f https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.0/kubectl/websphereliberty-app-crd.yaml ``` -------------------------------- ### Install RBAC for Watching Another Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.2/kubectl/readme.adoc Installs role-based access control with specific access to another namespace. It downloads an RBAC configuration, substitutes operator and watch namespaces, and applies the configuration. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.2/kubectl/websphereliberty-app-rbac-watch-another.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Install RBAC for Watching All Namespaces Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.0/kubectl/readme.adoc Installs cluster-level role-based access control for the operator to watch all namespaces. It uses curl to fetch the YAML, sed to substitute the operator namespace, and kubectl to apply the configuration. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.0/kubectl/websphereliberty-app-rbac-watch-all.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Install Cluster-Level RBAC for Watching All Namespaces Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.1/kubectl/readme.adoc Installs cluster-level role-based access control (RBAC) configurations, allowing the operator to watch all namespaces. This requires substituting the operator's namespace. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.1/kubectl/websphereliberty-app-rbac-watch-all.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Configure Operator Namespace and Watch Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.1/kubectl/readme.adoc Sets environment variables for the operator's namespace and the namespace it should watch. Ensure these namespaces exist before running. ```sh OPERATOR_NAMESPACE= WATCH_NAMESPACE= ``` -------------------------------- ### Install RBAC for Watching Another Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.0/kubectl/readme.adoc Installs role-based access control for the operator to watch a specific, different namespace. It fetches the YAML, substitutes both the operator and watch namespaces, and applies the configuration. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.0/kubectl/websphereliberty-app-rbac-watch-another.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Configure Operator Namespace and Watch Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.2/kubectl/readme.adoc Sets the operator's namespace and the namespace it should watch. Replace placeholders with actual namespace values. Ensure namespaces exist beforehand. ```sh OPERATOR_NAMESPACE= WATCH_NAMESPACE= ``` -------------------------------- ### Configure Operator Namespace and Watch Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.0/kubectl/readme.adoc Sets the operator's namespace and the namespace it should watch. Replace placeholders with actual namespace values. The namespaces must exist prior to execution. ```sh OPERATOR_NAMESPACE= WATCH_NAMESPACE= ``` -------------------------------- ### Install RBAC for Watching Another Namespace Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.1/kubectl/readme.adoc Installs role-based access control (RBAC) with access to a specific namespace, allowing the operator to watch that particular namespace. Requires substituting operator and watch namespaces. ```sh curl -L https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.1/kubectl/websphereliberty-app-rbac-watch-another.yaml \ | sed -e "s/WEBSPHERE_LIBERTY_OPERATOR_NAMESPACE/${OPERATOR_NAMESPACE}/" \ | sed -e "s/WEBSPHERE_LIBERTY_WATCH_NAMESPACE/${WATCH_NAMESPACE}/" \ | kubectl apply -f - ``` -------------------------------- ### Configure Autoscaling with Metrics Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home Configures autoscaling for WebSphere Liberty applications, including minimum and maximum replicas, and target utilization percentages for CPU and memory. It also demonstrates how to set up autoscaling based on custom metrics like 'packets-per-second'. ```yaml spec: resources: requests: cpu: "0.2" memory: 64Mi autoscaling: maxReplicas: 5 minReplicas: 3 targetCPUUtilizationPercentage: 70 targetMemoryUtilizationPercentage: 80 metrics: - type: Pods pods: metric: name: packets-per-second target: type: AverageValue averageValue: 1k ``` -------------------------------- ### Add CatalogSource for WebSphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home This YAML defines a CatalogSource resource for the WebSphere Liberty Operator. It specifies the display name for the catalog and the image location, including its SHA256 digest, which points to the operator's catalog image. This allows OpenShift's OperatorHub to discover and manage the installation of the WebSphere Liberty Operator. ```yaml apiVersion: operators.coreos.com/v1alpha1 kind: CatalogSource metadata: name: wlo-catalog namespace: openshift-marketplace spec: displayName: WebSphere Liberty Catalog 1.5.0-rc.1 image: 'icr.io/cpopen/websphere-liberty-operator-catalog@sha256:7e61368ffa298ba9b624ad92235b16cb39233609cd15dd92dbcc716a63e7e21b' sourceType: grpc ``` -------------------------------- ### Install Websphere Liberty Application CRDs Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/deploy/releases/1.0.2/kubectl/readme.adoc Applies the Custom Resource Definitions (CRDs) for WebsphereLibertyApplication and related day-2 operations. This command should be executed only once per cluster. ```sh kubectl apply -f https://raw.githubusercontent.com/WASdev/websphere-liberty-operator/main/deploy/releases/1.0.2/kubectl/websphereliberty-app-crd.yaml ``` -------------------------------- ### Configure WebSphere Liberty Performance Data Collection (YAML) Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home This snippet shows the YAML configuration for the `WebSphereLibertyPerformanceData` custom resource. It specifies the collection interval, the target pod name, and the timespan for data collection. The status section indicates the collection's lifecycle. ```YAML kind: WebSphereLibertyPerformanceData apiVersion: liberty.websphere.ibm.com/v1 metadata: name: websphereliberty-performance-data-sample namespace: liberty spec: interval: 30 podName: Specify_Pod_Name_Here timespan: 120 status: conditions: - lastUpdateTime: '2025-08-20T21:39:51Z' status: 'True' type: Started - lastUpdateTime: '2025-08-20T21:41:55Z' status: 'True' type: Completed observedGeneration: 1 performanceDataFile: /serviceability/liberty/app-1-f96f48b98-vcnxn/performanceData/linperf_RESULTS.20250820.213951.tar.gz versions: reconciled: 1.5.0 ``` -------------------------------- ### Configure DNS for Application Pod Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home Configures DNS settings for a WebSphere Liberty application pod by specifying the `dns.config` and `dns.policy` fields within the custom resource. This allows customization of nameservers and DNS resolution behavior. ```yaml spec: dns: config: nameservers: - 8.8.8.8 - 1.1.1.1 policy: None ``` -------------------------------- ### Configure Tolerations for Application Pods Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home Adds tolerations to WebSphere Liberty application pods, allowing them to be scheduled on nodes with matching taints. This is configured using the `spec.tolerations` field in the custom resource. ```yaml spec: tolerations: - key: "key1" operator: "Equal" value: "value1" ``` -------------------------------- ### Enable Password Encryption in CR Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home Enables the password encryption feature for a WebSphere Liberty application by setting the `managePasswordEncryption` field to `true` in the custom resource. ```yaml spec: managePasswordEncryption: true ``` -------------------------------- ### Create ImageContentSourcePolicy for Mirroring Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home This YAML configuration defines an ImageContentSourcePolicy to mirror operator artifacts from the staging registry (cp.stg.icr.io) to the production registry. It ensures that images built with production registry references can be accessed from the staging registry during development or testing phases. This policy is essential for environments where direct access to production registries might be restricted or for managing image sources during the development lifecycle. ```yaml apiVersion: operator.openshift.io/v1alpha1 kind: ImageContentSourcePolicy metadata: name: mirror-config spec: repositoryDigestMirrors: - mirrors: - cp.stg.icr.io/cp source: cp.icr.io/cp - mirrors: - cp.stg.icr.io/cp source: icr.io/cpopen - mirrors: - cp.stg.icr.io/cp source: icr.io/appcafe ``` -------------------------------- ### Configure Optional Pull Secrets for Service Account (YAML) Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home This YAML snippet demonstrates how to configure optional pull secrets for a service account within the WebSphere Liberty Operator. Setting `skipPullSecretValidation` to `true` allows for more flexible image pulling configurations. ```YAML spec: serviceAccount: skipPullSecretValidation: true ``` -------------------------------- ### Configure Password Encryption Secret Source: https://github.com/wasdev/websphere-liberty-operator/wiki/Home Creates a Kubernetes Secret to store the password encryption key for WebSphere Liberty applications. This key is used by the operator to encrypt sensitive password data within the application's custom resource. ```yaml apiVersion: v1 kind: Secret metadata: name: wlp-password-encryption-key type: Opaque stringData: passwordEncryptionKey: randomkey ``` -------------------------------- ### Mount Logs and Transaction Directories with WebSphere Liberty Operator Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/config/manifests/description.md This snippet demonstrates how to configure the WebSphere Liberty Operator to mount logs and transaction directories for an application. It specifies the volume size and mount path within the application's storage configuration. ```YAML size: 2Gi mountPath: "/logs" ``` -------------------------------- ### Sign Git Commit with DCO Source: https://github.com/wasdev/websphere-liberty-operator/blob/main/CONTRIBUTING.md This snippet demonstrates how to sign your Git commit message to certify your contribution according to the Developer's Certificate of Origin (DCO) 1.1. This is a requirement for accepting pull requests. ```git git commit -s -m "Your commit message" ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.