Skip to content

Commit 088dc5d

Browse files
authored
Merge pull request #162 from carolynvs/bump-porter
Update porter to 1.0.9
2 parents f03f6e9 + b14f628 commit 088dc5d

28 files changed

+336
-459
lines changed

api/v1/const.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const (
1010
//
1111
// As we test out the operator with new versions of Porter, keep this value
1212
// up-to-date so that the default version is guaranteed to work.
13-
DefaultPorterAgentVersion = "v1.0.6"
13+
DefaultPorterAgentVersion = "v1.0.9"
1414

1515
// LabelJobType is a label applied to jobs created by the operator. It
1616
// indicates the purpose of the job.

api/v1/credentialset_types_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestCredentialSetSpec_ToPorterDocument(t *testing.T) {
3131
}{
3232
{
3333
name: "golden file test",
34-
fields: fields{SchemaVersion: string(storage.CredentialSetSchemaVersion),
34+
fields: fields{SchemaVersion: string(storage.DefaultCredentialSetSchemaVersion),
3535
Name: "porter-test-me",
3636
Namespace: "dev",
3737
Credentials: []Credential{{

api/v1/installation_types_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func TestInstallationSpec_ToPorterDocument(t *testing.T) {
1616
// Validate the special handling for the arbitrary parameters
1717
// which the CRD can't directly represent as map[string]interface{}
1818
spec := InstallationSpec{
19-
SchemaVersion: string(storage.InstallationSchemaVersion),
19+
SchemaVersion: string(storage.DefaultInstallationSchemaVersion),
2020
Name: "mybuns",
2121
Namespace: "dev",
2222
Bundle: OCIReferenceParts{

api/v1/parameterset_types_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestParameterSetSpec_ToPorterDocument(t *testing.T) {
3131
}{
3232
{
3333
name: "golden file test",
34-
fields: fields{SchemaVersion: string(storage.ParameterSetSchemaVersion),
34+
fields: fields{SchemaVersion: string(storage.DefaultParameterSetSchemaVersion),
3535
Name: "porter-test-me",
3636
Namespace: "dev",
3737
Parameters: []Parameter{

api/v1/porterconfig_types_test.go

+16-16
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,28 @@ import (
1212
func TestPorterConfigSpec_MergeConfig(t *testing.T) {
1313
t.Run("empty is ignored", func(t *testing.T) {
1414
nsConfig := PorterConfigSpec{
15-
Verbosity: pointer.StringPtr("info"),
15+
Verbosity: pointer.String("info"),
1616
}
1717

1818
instConfig := PorterConfigSpec{}
1919

2020
config, err := nsConfig.MergeConfig(instConfig)
2121
require.NoError(t, err)
22-
assert.Equal(t, pointer.StringPtr("info"), config.Verbosity)
22+
assert.Equal(t, pointer.String("info"), config.Verbosity)
2323
})
2424

2525
t.Run("override", func(t *testing.T) {
2626
nsConfig := PorterConfigSpec{
27-
Verbosity: pointer.StringPtr("info"),
27+
Verbosity: pointer.String("info"),
2828
}
2929

3030
instConfig := PorterConfigSpec{
31-
Verbosity: pointer.StringPtr("debug"),
31+
Verbosity: pointer.String("debug"),
3232
}
3333

3434
config, err := nsConfig.MergeConfig(instConfig)
3535
require.NoError(t, err)
36-
assert.Equal(t, pointer.StringPtr("debug"), config.Verbosity)
36+
assert.Equal(t, pointer.String("debug"), config.Verbosity)
3737
})
3838
}
3939

@@ -47,14 +47,14 @@ func TestPorterConfigSpec_ToPorterDocument(t *testing.T) {
4747
{
4848
name: "All fields set",
4949
cfg: PorterConfigSpec{
50-
Verbosity: pointer.StringPtr("debug"),
51-
Namespace: pointer.StringPtr("test"),
50+
Verbosity: pointer.String("debug"),
51+
Namespace: pointer.String("test"),
5252
Experimental: []string{"build-drivers"},
53-
BuildDriver: pointer.StringPtr("buildkit"),
54-
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
55-
DefaultSecrets: pointer.StringPtr("keyvault"),
56-
DefaultStoragePlugin: pointer.StringPtr("mongodb"),
57-
DefaultSecretsPlugin: pointer.StringPtr("kubernetes.secrets"),
53+
BuildDriver: pointer.String("buildkit"),
54+
DefaultStorage: pointer.String("in-cluster-mongodb"),
55+
DefaultSecrets: pointer.String("keyvault"),
56+
DefaultStoragePlugin: pointer.String("mongodb"),
57+
DefaultSecretsPlugin: pointer.String("kubernetes.secrets"),
5858
Storage: []StorageConfig{
5959
{PluginConfig{
6060
Name: "in-cluster-mongodb",
@@ -94,8 +94,8 @@ secrets:
9494
{
9595
name: "Storage config not provided",
9696
cfg: PorterConfigSpec{
97-
DefaultSecretsPlugin: pointer.StringPtr("kubernetes.secrets"),
98-
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
97+
DefaultSecretsPlugin: pointer.String("kubernetes.secrets"),
98+
DefaultStorage: pointer.String("in-cluster-mongodb"),
9999
Storage: []StorageConfig{
100100
{PluginConfig{
101101
Name: "in-cluster-mongodb",
@@ -113,8 +113,8 @@ storage:
113113
{
114114
name: "Secrets config not provided",
115115
cfg: PorterConfigSpec{
116-
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
117-
DefaultSecrets: pointer.StringPtr("kubernetes-secrets"),
116+
DefaultStorage: pointer.String("in-cluster-mongodb"),
117+
DefaultSecrets: pointer.String("kubernetes-secrets"),
118118
Storage: []StorageConfig{
119119
{PluginConfig{
120120
Name: "in-cluster-mongodb",

config/crd/bases/getporter.org_agentactions.yaml

+69-23
Original file line numberDiff line numberDiff line change
@@ -700,9 +700,12 @@ spec:
700700
provisioner or an external controller can support
701701
the specified data source, it will create a new
702702
volume based on the contents of the specified
703-
data source. If the AnyVolumeDataSource feature
704-
gate is enabled, this field will always have the
705-
same contents as the DataSourceRef field.'
703+
data source. When the AnyVolumeDataSource feature
704+
gate is enabled, dataSource contents will be copied
705+
to dataSourceRef, and dataSourceRef contents will
706+
be copied to dataSource when dataSourceRef.namespace
707+
is not specified. If the namespace is specified,
708+
then dataSourceRef will not be copied to dataSource.'
706709
properties:
707710
apiGroup:
708711
description: APIGroup is the group for the resource
@@ -727,27 +730,35 @@ spec:
727730
description: 'dataSourceRef specifies the object
728731
from which to populate the volume with data, if
729732
a non-empty volume is desired. This may be any
730-
local object from a non-empty API group (non core
731-
object) or a PersistentVolumeClaim object. When
732-
this field is specified, volume binding will only
733-
succeed if the type of the specified object matches
734-
some installed volume populator or dynamic provisioner.
733+
object from a non-empty API group (non core object)
734+
or a PersistentVolumeClaim object. When this field
735+
is specified, volume binding will only succeed
736+
if the type of the specified object matches some
737+
installed volume populator or dynamic provisioner.
735738
This field will replace the functionality of the
736-
DataSource field and as such if both fields are
739+
dataSource field and as such if both fields are
737740
non-empty, they must have the same value. For
738-
backwards compatibility, both fields (DataSource
739-
and DataSourceRef) will be set to the same value
741+
backwards compatibility, when namespace isn''t
742+
specified in dataSourceRef, both fields (dataSource
743+
and dataSourceRef) will be set to the same value
740744
automatically if one of them is empty and the
741-
other is non-empty. There are two important differences
742-
between DataSource and DataSourceRef: * While
743-
DataSource only allows two specific types of objects,
744-
DataSourceRef allows any non-core object, as well
745-
as PersistentVolumeClaim objects. * While DataSource
746-
ignores disallowed values (dropping them), DataSourceRef
747-
preserves all values, and generates an error if
748-
a disallowed value is specified. (Beta) Using
749-
this field requires the AnyVolumeDataSource feature
750-
gate to be enabled.'
745+
other is non-empty. When namespace is specified
746+
in dataSourceRef, dataSource isn''t set to the
747+
same value and must be empty. There are three
748+
important differences between dataSource and dataSourceRef:
749+
* While dataSource only allows two specific types
750+
of objects, dataSourceRef allows any non-core
751+
object, as well as PersistentVolumeClaim objects.
752+
* While dataSource ignores disallowed values (dropping
753+
them), dataSourceRef preserves all values, and
754+
generates an error if a disallowed value is specified.
755+
* While dataSource only allows local objects,
756+
dataSourceRef allows objects in any namespaces.
757+
(Beta) Using this field requires the AnyVolumeDataSource
758+
feature gate to be enabled. (Alpha) Using the
759+
namespace field of dataSourceRef requires the
760+
CrossNamespaceVolumeDataSource feature gate to
761+
be enabled.'
751762
properties:
752763
apiGroup:
753764
description: APIGroup is the group for the resource
@@ -764,6 +775,17 @@ spec:
764775
description: Name is the name of resource being
765776
referenced
766777
type: string
778+
namespace:
779+
description: Namespace is the namespace of resource
780+
being referenced Note that when a namespace
781+
is specified, a gateway.networking.k8s.io/ReferenceGrant
782+
object is required in the referent namespace
783+
to allow that namespace's owner to accept
784+
the reference. See the ReferenceGrant documentation
785+
for details. (Alpha) This field requires the
786+
CrossNamespaceVolumeDataSource feature gate
787+
to be enabled.
788+
type: string
767789
required:
768790
- kind
769791
- name
@@ -776,6 +798,30 @@ spec:
776798
value but must still be higher than capacity recorded
777799
in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
778800
properties:
801+
claims:
802+
description: "Claims lists the names of resources,
803+
defined in spec.resourceClaims, that are used
804+
by this container. \n This is an alpha field
805+
and requires enabling the DynamicResourceAllocation
806+
feature gate. \n This field is immutable."
807+
items:
808+
description: ResourceClaim references one
809+
entry in PodSpec.ResourceClaims.
810+
properties:
811+
name:
812+
description: Name must match the name
813+
of one entry in pod.spec.resourceClaims
814+
of the Pod where this field is used.
815+
It makes that resource available inside
816+
a container.
817+
type: string
818+
required:
819+
- name
820+
type: object
821+
type: array
822+
x-kubernetes-list-map-keys:
823+
- name
824+
x-kubernetes-list-type: map
779825
limits:
780826
additionalProperties:
781827
anyOf:
@@ -1758,8 +1804,8 @@ spec:
17581804
description: "Condition contains details for one aspect of the current
17591805
state of this API Resource. --- This struct is intended for direct
17601806
use as an array at the field path .status.conditions. For example,
1761-
type FooStatus struct{ // Represents the observations of a foo's
1762-
current state. // Known .status.conditions.type are: \"Available\",
1807+
\n type FooStatus struct{ // Represents the observations of a
1808+
foo's current state. // Known .status.conditions.type are: \"Available\",
17631809
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
17641810
// +listType=map // +listMapKey=type Conditions []metav1.Condition
17651811
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

config/crd/bases/getporter.org_agentconfigs.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ spec:
125125
description: "Condition contains details for one aspect of the current
126126
state of this API Resource. --- This struct is intended for direct
127127
use as an array at the field path .status.conditions. For example,
128-
type FooStatus struct{ // Represents the observations of a foo's
129-
current state. // Known .status.conditions.type are: \"Available\",
128+
\n type FooStatus struct{ // Represents the observations of a
129+
foo's current state. // Known .status.conditions.type are: \"Available\",
130130
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
131131
// +listType=map // +listMapKey=type Conditions []metav1.Condition
132132
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

config/crd/bases/getporter.org_credentialsets.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ spec:
112112
description: "Condition contains details for one aspect of the current
113113
state of this API Resource. --- This struct is intended for direct
114114
use as an array at the field path .status.conditions. For example,
115-
type FooStatus struct{ // Represents the observations of a foo's
116-
current state. // Known .status.conditions.type are: \"Available\",
115+
\n type FooStatus struct{ // Represents the observations of a
116+
foo's current state. // Known .status.conditions.type are: \"Available\",
117117
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
118118
// +listType=map // +listMapKey=type Conditions []metav1.Condition
119119
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

config/crd/bases/getporter.org_installations.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,8 @@ spec:
135135
description: "Condition contains details for one aspect of the current
136136
state of this API Resource. --- This struct is intended for direct
137137
use as an array at the field path .status.conditions. For example,
138-
type FooStatus struct{ // Represents the observations of a foo's
139-
current state. // Known .status.conditions.type are: \"Available\",
138+
\n type FooStatus struct{ // Represents the observations of a
139+
foo's current state. // Known .status.conditions.type are: \"Available\",
140140
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
141141
// +listType=map // +listMapKey=type Conditions []metav1.Condition
142142
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

config/crd/bases/getporter.org_parametersets.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ spec:
116116
description: "Condition contains details for one aspect of the current
117117
state of this API Resource. --- This struct is intended for direct
118118
use as an array at the field path .status.conditions. For example,
119-
type FooStatus struct{ // Represents the observations of a foo's
120-
current state. // Known .status.conditions.type are: \"Available\",
119+
\n type FooStatus struct{ // Represents the observations of a
120+
foo's current state. // Known .status.conditions.type are: \"Available\",
121121
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
122122
// +listType=map // +listMapKey=type Conditions []metav1.Condition
123123
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"

0 commit comments

Comments
 (0)