Skip to content

Commit 983a42e

Browse files
committed
chore: actually add the files
Signed-off-by: Chris Butler <chris.butler@redhat.com>
1 parent 464573a commit 983a42e

File tree

5 files changed

+167
-0
lines changed

5 files changed

+167
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Lint PR title"
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
branches:
10+
- 'main'
11+
- 'develop'
12+
jobs:
13+
lint:
14+
if: ${{ github.head_ref != 'develop' }}
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Install dependencies
21+
run: npm install @commitlint/cli @commitlint/config-conventional
22+
23+
- name: Validate PR title
24+
run: |
25+
PR_TITLE=$(jq -r '.pull_request.title' "$GITHUB_EVENT_PATH")
26+
echo "$PR_TITLE" | npx commitlint --config commitlint.config.js

.prettierrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"singleQuote": true,
3+
"semi": false
4+
}

commitlint.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = { extends: ['@commitlint/config-conventional'] }
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
apiVersion: policy.open-cluster-management.io/v1
3+
kind: Policy
4+
metadata:
5+
name: hub-to-spoke-initdata-policy
6+
namespace: imperative
7+
annotations:
8+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
9+
spec:
10+
remediationAction: enforce
11+
disabled: false
12+
policy-templates:
13+
- objectDefinition:
14+
apiVersion: policy.open-cluster-management.io/v1
15+
kind: ConfigurationPolicy
16+
metadata:
17+
name: hub-to-spoke-initdata-cp
18+
namespace: imperative
19+
spec:
20+
remediationAction: enforce
21+
severity: medium
22+
namespaceSelector:
23+
include:
24+
- imperative
25+
object-templates:
26+
- complianceType: mustonlyhave
27+
objectDefinition:
28+
apiVersion: v1
29+
kind: ConfigMap
30+
metadata:
31+
name: initdata
32+
namespace: imperative
33+
data:
34+
INITDATA: '{{ `{{hub fromConfigMap "imperative" "initdata" "INITDATA" hub}}` }}'
35+
36+
---
37+
apiVersion: policy.open-cluster-management.io/v1
38+
kind: PlacementBinding
39+
metadata:
40+
name: hub-to-spoke-initdata-placement-binding
41+
namespace: imperative
42+
annotations:
43+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
44+
placementRef:
45+
name: hub-to-spoke-initdata-placement-rule
46+
kind: PlacementRule
47+
apiGroup: apps.open-cluster-management.io
48+
subjects:
49+
- name: hub-to-spoke-initdata-policy
50+
kind: Policy
51+
apiGroup: policy.open-cluster-management.io
52+
53+
---
54+
apiVersion: apps.open-cluster-management.io/v1
55+
kind: PlacementRule
56+
metadata:
57+
name: hub-to-spoke-initdata-placement-rule
58+
namespace: imperative
59+
spec:
60+
clusterConditions:
61+
- status: 'True'
62+
type: ManagedClusterConditionAvailable
63+
clusterSelector:
64+
matchExpressions:
65+
# Only apply to spoke clusters (exclude local-cluster which is typically the hub)
66+
- key: name
67+
operator: NotIn
68+
values: ["local-cluster"]

templates/peer-pods-cm.yaml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
apiVersion: policy.open-cluster-management.io/v1
3+
kind: Policy
4+
metadata:
5+
name: peerpods-cm-policy
6+
spec:
7+
remediationAction: enforce
8+
disabled: false
9+
policy-templates:
10+
- objectDefinition:
11+
apiVersion: policy.open-cluster-management.io/v1
12+
kind: ConfigurationPolicy
13+
metadata:
14+
name: peerpods-cm-cp
15+
spec:
16+
remediationAction: enforce
17+
severity: medium
18+
object-templates:
19+
20+
- complianceType: mustonlyhave
21+
objectDefinition:
22+
apiVersion: v1
23+
kind: ConfigMap
24+
metadata:
25+
name: peer-pods-cm
26+
namespace: openshift-sandboxed-containers-operator
27+
data:
28+
CLOUD_PROVIDER: "azure"
29+
VXLAN_PORT: "9000"
30+
AZURE_IMAGE_ID: '{{ `{{if (lookup "v1" "ConfigMap" "openshift-sandboxed-containers-operator" "peer-pods-cm").metadata.name }}{{ fromConfigMap "openshift-sandboxed-containers-operator" "peer-pods-cm" "AZURE_IMAGE_ID" }}{{ else }}{{ end }}` }}'
31+
AZURE_INSTANCE_SIZE: "{{ .Values.global.coco.azure.defaultVMFlavour }}"
32+
AZURE_INSTANCE_SIZES: "{{ .Values.global.coco.azure.VMFlavours }}"
33+
AZURE_RESOURCE_GROUP: '{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).vnetResourceGroup }}` }}'
34+
AZURE_REGION: '{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).location }}` }}'
35+
AZURE_SUBNET_ID: '/subscriptions/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).subscriptionId }}` }}/resourceGroups/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).vnetResourceGroup }}` }}/providers/Microsoft.Network/virtualNetworks/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).vnetName }}` }}/subnets/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).subnetName }}` }}'
36+
AZURE_NSG_ID: '/subscriptions/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).subscriptionId }}` }}/resourceGroups/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).resourceGroup }}` }}/providers/Microsoft.Network/networkSecurityGroups/{{ `{{ (fromJson (fromConfigMap "openshift-cloud-controller-manager" "cloud-conf" "cloud.conf" | toLiteral)).securityGroupName }}` }}'
37+
DISABLECVM: "false"
38+
PROXY_TIMEOUT: "5m"
39+
INITDATA: '{{ `{{ fromConfigMap "imperative" "initdata" "INITDATA" }}` }}'
40+
41+
---
42+
apiVersion: policy.open-cluster-management.io/v1
43+
kind: PlacementBinding
44+
metadata:
45+
name: peerpods-placement-binding
46+
annotations:
47+
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true
48+
placementRef:
49+
name: peerpods-placement-rule
50+
kind: PlacementRule
51+
apiGroup: apps.open-cluster-management.io
52+
subjects:
53+
- name: peerpods-cm-policy
54+
kind: Policy
55+
apiGroup: policy.open-cluster-management.io
56+
---
57+
apiVersion: apps.open-cluster-management.io/v1
58+
kind: PlacementRule
59+
metadata:
60+
name: peerpods-placement-rule
61+
spec:
62+
clusterConditions:
63+
- status: 'True'
64+
type: ManagedClusterConditionAvailable
65+
clusterSelector:
66+
matchLabels:
67+
cloud: Azure
68+
---

0 commit comments

Comments
 (0)