Skip to content

Commit af926a0

Browse files
authored
PackageVariant controller: implement pruning, deletionPolicy, and adoptionPolicy (#3701)
1 parent bb2725f commit af926a0

File tree

13 files changed

+1516
-406
lines changed

13 files changed

+1516
-406
lines changed

porch/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ TEST_GIT_SERVER_IMAGE ?= test-git-server
4949
# Only enable a subset of reconcilers in porch controllers by default. Use the RECONCILERS
5050
# env variable to specify a specific list of reconcilers or use
5151
# RECONCILERS=* to enable all known reconcilers.
52-
ALL_RECONCILERS="rootsyncsets,remoterootsyncsets,workloadidentitybindings,rootsyncdeployments,functiondiscovery,downstreampackages,rootsyncrollouts"
52+
ALL_RECONCILERS="rootsyncsets,remoterootsyncsets,workloadidentitybindings,rootsyncdeployments,functiondiscovery,packagevariants,rootsyncrollouts"
5353
ifndef RECONCILERS
5454
ENABLED_RECONCILERS="rootsyncsets,remoterootsyncsets,workloadidentitybindings,functiondiscovery"
5555
else

porch/controllers/config/crd/bases/config.porch.kpt.dev_downstreampackages.yaml renamed to porch/controllers/config/crd/bases/config.porch.kpt.dev_packagevariants.yaml

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright 2022 Google LLC
1+
# Copyright 2023 Google LLC
22
#
33
# Licensed under the Apache License, Version 2.0 (the "License");
44
# you may not use this file except in compliance with the License.
@@ -19,23 +19,23 @@ metadata:
1919
annotations:
2020
controller-gen.kubebuilder.io/version: v0.8.0
2121
creationTimestamp: null
22-
name: downstreampackages.config.porch.kpt.dev
22+
name: packagevariants.config.porch.kpt.dev
2323
spec:
2424
group: config.porch.kpt.dev
2525
names:
26-
kind: DownstreamPackage
27-
listKind: DownstreamPackageList
28-
plural: downstreampackages
29-
singular: downstreampackage
26+
kind: PackageVariant
27+
listKind: PackageVariantList
28+
plural: packagevariants
29+
singular: packagevariant
3030
scope: Namespaced
3131
versions:
3232
- name: v1alpha1
3333
schema:
3434
openAPIV3Schema:
35-
description: DownstreamPackage represents an upstream and downstream porch
36-
package pair. The upstream package should already exist. The DownstreamPackage
37-
controller is responsible for creating the downstream package revisions
38-
based on the spec.
35+
description: PackageVariant represents an upstream and downstream porch package
36+
pair. The upstream package should already exist. The PackageVariant controller
37+
is responsible for creating the downstream package revisions based on the
38+
spec.
3939
properties:
4040
apiVersion:
4141
description: 'APIVersion defines the versioned schema of this representation
@@ -50,7 +50,7 @@ spec:
5050
metadata:
5151
type: object
5252
spec:
53-
description: DownstreamPackageSpec defines the desired state of DownstreamPackage
53+
description: PackageVariantSpec defines the desired state of PackageVariant
5454
properties:
5555
adoptionPolicy:
5656
type: string
@@ -74,7 +74,12 @@ spec:
7474
type: object
7575
type: object
7676
status:
77-
description: DownstreamPackageStatus defines the observed state of DownstreamPackage
77+
description: PackageVariantStatus defines the observed state of PackageVariant
78+
properties:
79+
validationErrors:
80+
items:
81+
type: string
82+
type: array
7883
type: object
7984
type: object
8085
served: true

0 commit comments

Comments
 (0)