...

Text file src/github.com/GoogleCloudPlatform/k8s-config-connector/config/samples/resources/osconfigospolicyassignment/fixed-os-policy-assignment/osconfig_v1beta1_osconfigospolicyassignment.yaml

Documentation: github.com/GoogleCloudPlatform/k8s-config-connector/config/samples/resources/osconfigospolicyassignment/fixed-os-policy-assignment

     1# Copyright 2021 Google LLC
     2#
     3# Licensed under the Apache License, Version 2.0 (the "License");
     4# you may not use this file except in compliance with the License.
     5# You may obtain a copy of the License at
     6#
     7#     http://www.apache.org/licenses/LICENSE-2.0
     8#
     9# Unless required by applicable law or agreed to in writing, software
    10# distributed under the License is distributed on an "AS IS" BASIS,
    11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12# See the License for the specific language governing permissions and
    13# limitations under the License.
    14
    15apiVersion: osconfig.cnrm.cloud.google.com/v1beta1
    16kind: OSConfigOSPolicyAssignment
    17metadata:
    18  name: osconfigospolicyassignment-sample-fixedospolicyassignment
    19spec:
    20  projectRef:
    21     # Replace ${PROJECT_ID?} with your project ID
    22     external: "projects/${PROJECT_ID?}"
    23  location: "us-west2-a"
    24  description: "A test os policy assignment"
    25  osPolicies:
    26  - id: "policy"
    27    description: "A test os policy"
    28    mode: "VALIDATION"
    29    resourceGroups:
    30    - inventoryFilters:
    31      - osShortName: "centos"
    32        osVersion: "8.*"
    33      resources:
    34      - id: "apt"
    35        pkg:
    36          desiredState: "INSTALLED"
    37          apt:
    38            name: "bazel"
    39      - id: "deb1"
    40        pkg:
    41          desiredState: "INSTALLED"
    42          deb:
    43            source:
    44              localPath: "$HOME/package.deb"
    45      - id: "deb2"
    46        pkg:
    47          desiredState: "INSTALLED"
    48          deb:
    49            pullDeps: true
    50            source:
    51              allowInsecure: true
    52              remote:
    53                uri: "ftp.us.debian.org/debian/package.deb"
    54                sha256Checksum: "3bbfd1043cd7afdb78cf9afec36c0c5370d2fea98166537b4e67f3816f256025"
    55      - id: "deb3"
    56        pkg:
    57          desiredState: "INSTALLED"
    58          deb:
    59            pullDeps: true
    60            source:
    61              gcs:
    62                bucket: "test-bucket"
    63                object: "test-object"
    64                generation: 1
    65      - id: "yum"
    66        pkg:
    67          desiredState: "INSTALLED"
    68          yum:
    69            name: "gstreamer-plugins-base-devel.x86_64"
    70      - id: "zypper"
    71        pkg:
    72          desiredState: "INSTALLED"
    73          zypper:
    74            name: "gcc"
    75      - id: "rpm1"
    76        pkg:
    77          desiredState: "INSTALLED"
    78          rpm:
    79            pullDeps: true
    80            source:
    81              localPath: "$HOME/package.rpm"
    82      - id: "rpm2"
    83        pkg:
    84          desiredState: "INSTALLED"
    85          rpm:
    86            source:
    87              allowInsecure: true
    88              remote:
    89                uri: "https://mirror.jaleco.com/centos/8.3.2011/BaseOS/x86_64/os/Packages/efi-filesystem-3-2.el8.noarch.rpm"
    90                sha256Checksum: "3bbfd1043cd7afdb78cf9afec36c0c5370d2fea98166537b4e67f3816f256025"
    91      - id: "rpm3"
    92        pkg:
    93          desiredState: "INSTALLED"
    94          rpm:
    95            source:
    96              gcs:
    97                bucket: "test-bucket"
    98                object: "test-object"
    99                generation: 1
   100    - resources:
   101      - id: "apt-to-deb"
   102        pkg:
   103          desiredState: "INSTALLED"
   104          apt:
   105            name: "bazel"
   106      - id: "deb-local-path-to-gcs"
   107        pkg:
   108          desiredState: "INSTALLED"
   109          deb:
   110            source:
   111              localPath: "$HOME/package.deb"
   112      - id: "googet"
   113        pkg:
   114          desiredState: "INSTALLED"
   115          googet:
   116            name: "gcc"
   117      - id: "msi1"
   118        pkg:
   119          desiredState: "INSTALLED"
   120          msi:
   121            source:
   122              localPath: "$HOME/package.msi"
   123            properties:
   124            - "REBOOT=ReallySuppress"
   125      - id: "msi2"
   126        pkg:
   127          desiredState: "INSTALLED"
   128          msi:
   129            source:
   130              allowInsecure: true
   131              remote:
   132                uri: "https://remote.uri.com/package.msi"
   133                sha256Checksum: "3bbfd1043cd7afdb78cf9afec36c0c5370d2fea98166537b4e67f3816f256025"
   134              sha256Checksum: "3bbfd1043cd7afdb78cf9afec36c0c5370d2fea98166537b4e67f3816f256025"
   135      - id: "msi3"
   136        pkg:
   137          desiredState: "INSTALLED"
   138          msi:
   139            source:
   140              gcs:
   141                bucket: "test-bucket"
   142                object: "test-object"
   143                generation: 1
   144    allowNoResourceGroupMatch: false
   145  instanceFilter:
   146    all: false
   147    inclusionLabels:
   148    - labels:
   149        label-one: "value-one"
   150    exclusionLabels:
   151    - labels:
   152        label-two: "value-two"
   153    inventories:
   154    - osShortName: "centos"
   155      osVersion: "8.*"
   156  rollout:
   157    disruptionBudget:
   158      fixed: 1
   159    minWaitDuration: "3.5s"

View as plain text