Skip to content

Commit 585b633

Browse files
authored
Merge branch 'open-cluster-management-io:main' into diagram
2 parents 11599a0 + d2c11fc commit 585b633

File tree

81 files changed

+2170
-530
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+2170
-530
lines changed

.github/workflows/fossa.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout Repo
16-
uses: actions/checkout@v4
16+
uses: actions/checkout@v5
1717

1818
- name: Run FOSSA Scan
1919
uses: fossas/fossa-action@v1

.github/workflows/go-postsubmit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: checkout code
14-
uses: actions/checkout@v4
14+
uses: actions/checkout@v5
1515
- name: images
1616
run: make build-images
1717
- name: push

.github/workflows/go-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
echo "REPO_NAME=${REPO_NAME}" >> ${GITHUB_ENV}
2020
echo "IMAGE_PATH=quay.io/open-cluster-management/${REPO_NAME}:${TAG}" >> ${GITHUB_ENV}
2121
- name: checkout code
22-
uses: actions/checkout@v4
22+
uses: actions/checkout@v5
2323
- name: build images
2424
run: |
2525
make build-images

.github/workflows/kind.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323
REGISTRY: localhost:5000
2424
steps:
2525
- name: Checkout Config Policy Controller
26-
uses: actions/checkout@v4
26+
uses: actions/checkout@v5
2727

2828
- name: Set up Go
29-
uses: actions/setup-go@v5
29+
uses: actions/setup-go@v6
3030
with:
3131
go-version-file: go.mod
3232

@@ -94,10 +94,10 @@ jobs:
9494
- "latest"
9595
steps:
9696
- name: Checkout Config Policy Controller
97-
uses: actions/checkout@v4
97+
uses: actions/checkout@v5
9898

9999
- name: Set up Go
100-
uses: actions/setup-go@v5
100+
uses: actions/setup-go@v6
101101
with:
102102
go-version-file: go.mod
103103

@@ -146,10 +146,10 @@ jobs:
146146
- "latest"
147147
steps:
148148
- name: Checkout Config Policy Controller
149-
uses: actions/checkout@v4
149+
uses: actions/checkout@v5
150150

151151
- name: Set up Go
152-
uses: actions/setup-go@v5
152+
uses: actions/setup-go@v6
153153
with:
154154
go-version-file: go.mod
155155

@@ -199,10 +199,10 @@ jobs:
199199
- "latest"
200200
steps:
201201
- name: Checkout Config Policy Controller
202-
uses: actions/checkout@v4
202+
uses: actions/checkout@v5
203203

204204
- name: Set up Go
205-
uses: actions/setup-go@v5
205+
uses: actions/setup-go@v6
206206
with:
207207
go-version-file: go.mod
208208

@@ -245,15 +245,15 @@ jobs:
245245
runs-on: ubuntu-latest
246246
steps:
247247
- name: Checkout Config Policy Controller
248-
uses: actions/checkout@v4
248+
uses: actions/checkout@v5
249249

250250
- name: Set up Go
251-
uses: actions/setup-go@v5
251+
uses: actions/setup-go@v6
252252
with:
253253
go-version: 'stable'
254254

255255
- name: Download Coverage Results
256-
uses: actions/download-artifact@v4
256+
uses: actions/download-artifact@v5
257257
with:
258258
merge-multiple: true
259259

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ test/crds/test-policy.yaml
8888
!vbh/.build-harness-vendorized
8989
!vbh/build-harness
9090
!vbh/build-harness-extensions
91-
kubeconfig_managed*
91+
kubeconfig_*
9292
kind_kubeconfig.yaml
9393
report.json
9494
report_*.json

Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ LOCAL_BIN ?= $(PWD)/bin
1818
export PATH := $(LOCAL_BIN):$(PATH)
1919
GOARCH = $(shell go env GOARCH)
2020
GOOS = $(shell go env GOOS)
21-
TESTARGS_DEFAULT := -v
22-
TESTARGS ?= $(TESTARGS_DEFAULT)
2321
CONTROLLER_NAME = $(shell cat COMPONENT_NAME 2> /dev/null)
2422
# Handle KinD configuration
2523
MANAGED_CLUSTER_SUFFIX ?=

api/v1/configurationpolicy_types.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,11 @@ type ObjectProperties struct {
417417
// Diff stores the difference between the `objectDefinition` in the policy and the object on the
418418
// cluster.
419419
Diff string `json:"diff,omitempty"`
420+
421+
// MatchesAfterDryRun indicates whether the object matches the policy after the dry run update. If true,
422+
// there was an initial mismatch between the policy and object, but the dry run update produced
423+
// a compliant result.
424+
MatchesAfterDryRun bool `json:"matchesAfterDryRun,omitempty"`
420425
}
421426

422427
// RelatedObject contains the details of an object matched by the policy.
@@ -452,6 +457,16 @@ type ConfigurationPolicyStatus struct {
452457
// RelatedObjects is a list of objects processed by the configuration policy due to its
453458
// `object-templates`.
454459
RelatedObjects []RelatedObject `json:"relatedObjects,omitempty"`
460+
461+
// History is a list of the most recent compliance messages for this configuration policy.
462+
// The first entry is the most recent, and the list is limited to 10 entries.
463+
History []HistoryEvent `json:"history,omitempty"`
464+
}
465+
466+
// HistoryEvent is a timestamped message representing the policy compliance state at that time.
467+
type HistoryEvent struct {
468+
LastTimestamp metav1.MicroTime `json:"lastTimestamp,omitempty"`
469+
Message string `json:"message,omitempty"`
455470
}
456471

457472
func (c ConfigurationPolicy) ObjectIdentifier() depclient.ObjectIdentifier {

api/v1/zz_generated.deepcopy.go

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

api/v1beta1/operatorpolicy_types.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,10 @@ type OperatorPolicyStatus struct {
242242
// policy is waiting for OLM to resolve the situation. If in the recent past,
243243
// the policy may update the status of the Subscription.
244244
SubscriptionInterventionTime *metav1.Time `json:"subscriptionInterventionTime,omitempty"`
245+
246+
// History is a list of the most recent compliance messages for this operator policy.
247+
// The first entry is the most recent, and the list is limited to 10 entries.
248+
History []policyv1.HistoryEvent `json:"history,omitempty"`
245249
}
246250

247251
// RelatedObjsOfKind iterates over the related objects in the status and returns a map of the index

api/v1beta1/zz_generated.deepcopy.go

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)