Skip to content

Commit

Permalink
Merge pull request #162 from carolynvs/bump-porter
Browse files Browse the repository at this point in the history
Update porter to 1.0.9
  • Loading branch information
carolynvs authored Feb 22, 2023
2 parents f03f6e9 + b14f628 commit 088dc5d
Show file tree
Hide file tree
Showing 28 changed files with 336 additions and 459 deletions.
2 changes: 1 addition & 1 deletion api/v1/const.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const (
//
// As we test out the operator with new versions of Porter, keep this value
// up-to-date so that the default version is guaranteed to work.
DefaultPorterAgentVersion = "v1.0.6"
DefaultPorterAgentVersion = "v1.0.9"

// LabelJobType is a label applied to jobs created by the operator. It
// indicates the purpose of the job.
Expand Down
2 changes: 1 addition & 1 deletion api/v1/credentialset_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestCredentialSetSpec_ToPorterDocument(t *testing.T) {
}{
{
name: "golden file test",
fields: fields{SchemaVersion: string(storage.CredentialSetSchemaVersion),
fields: fields{SchemaVersion: string(storage.DefaultCredentialSetSchemaVersion),
Name: "porter-test-me",
Namespace: "dev",
Credentials: []Credential{{
Expand Down
2 changes: 1 addition & 1 deletion api/v1/installation_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestInstallationSpec_ToPorterDocument(t *testing.T) {
// Validate the special handling for the arbitrary parameters
// which the CRD can't directly represent as map[string]interface{}
spec := InstallationSpec{
SchemaVersion: string(storage.InstallationSchemaVersion),
SchemaVersion: string(storage.DefaultInstallationSchemaVersion),
Name: "mybuns",
Namespace: "dev",
Bundle: OCIReferenceParts{
Expand Down
2 changes: 1 addition & 1 deletion api/v1/parameterset_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestParameterSetSpec_ToPorterDocument(t *testing.T) {
}{
{
name: "golden file test",
fields: fields{SchemaVersion: string(storage.ParameterSetSchemaVersion),
fields: fields{SchemaVersion: string(storage.DefaultParameterSetSchemaVersion),
Name: "porter-test-me",
Namespace: "dev",
Parameters: []Parameter{
Expand Down
32 changes: 16 additions & 16 deletions api/v1/porterconfig_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,28 +12,28 @@ import (
func TestPorterConfigSpec_MergeConfig(t *testing.T) {
t.Run("empty is ignored", func(t *testing.T) {
nsConfig := PorterConfigSpec{
Verbosity: pointer.StringPtr("info"),
Verbosity: pointer.String("info"),
}

instConfig := PorterConfigSpec{}

config, err := nsConfig.MergeConfig(instConfig)
require.NoError(t, err)
assert.Equal(t, pointer.StringPtr("info"), config.Verbosity)
assert.Equal(t, pointer.String("info"), config.Verbosity)
})

t.Run("override", func(t *testing.T) {
nsConfig := PorterConfigSpec{
Verbosity: pointer.StringPtr("info"),
Verbosity: pointer.String("info"),
}

instConfig := PorterConfigSpec{
Verbosity: pointer.StringPtr("debug"),
Verbosity: pointer.String("debug"),
}

config, err := nsConfig.MergeConfig(instConfig)
require.NoError(t, err)
assert.Equal(t, pointer.StringPtr("debug"), config.Verbosity)
assert.Equal(t, pointer.String("debug"), config.Verbosity)
})
}

Expand All @@ -47,14 +47,14 @@ func TestPorterConfigSpec_ToPorterDocument(t *testing.T) {
{
name: "All fields set",
cfg: PorterConfigSpec{
Verbosity: pointer.StringPtr("debug"),
Namespace: pointer.StringPtr("test"),
Verbosity: pointer.String("debug"),
Namespace: pointer.String("test"),
Experimental: []string{"build-drivers"},
BuildDriver: pointer.StringPtr("buildkit"),
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
DefaultSecrets: pointer.StringPtr("keyvault"),
DefaultStoragePlugin: pointer.StringPtr("mongodb"),
DefaultSecretsPlugin: pointer.StringPtr("kubernetes.secrets"),
BuildDriver: pointer.String("buildkit"),
DefaultStorage: pointer.String("in-cluster-mongodb"),
DefaultSecrets: pointer.String("keyvault"),
DefaultStoragePlugin: pointer.String("mongodb"),
DefaultSecretsPlugin: pointer.String("kubernetes.secrets"),
Storage: []StorageConfig{
{PluginConfig{
Name: "in-cluster-mongodb",
Expand Down Expand Up @@ -94,8 +94,8 @@ secrets:
{
name: "Storage config not provided",
cfg: PorterConfigSpec{
DefaultSecretsPlugin: pointer.StringPtr("kubernetes.secrets"),
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
DefaultSecretsPlugin: pointer.String("kubernetes.secrets"),
DefaultStorage: pointer.String("in-cluster-mongodb"),
Storage: []StorageConfig{
{PluginConfig{
Name: "in-cluster-mongodb",
Expand All @@ -113,8 +113,8 @@ storage:
{
name: "Secrets config not provided",
cfg: PorterConfigSpec{
DefaultStorage: pointer.StringPtr("in-cluster-mongodb"),
DefaultSecrets: pointer.StringPtr("kubernetes-secrets"),
DefaultStorage: pointer.String("in-cluster-mongodb"),
DefaultSecrets: pointer.String("kubernetes-secrets"),
Storage: []StorageConfig{
{PluginConfig{
Name: "in-cluster-mongodb",
Expand Down
92 changes: 69 additions & 23 deletions config/crd/bases/getporter.org_agentactions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -700,9 +700,12 @@ spec:
provisioner or an external controller can support
the specified data source, it will create a new
volume based on the contents of the specified
data source. If the AnyVolumeDataSource feature
gate is enabled, this field will always have the
same contents as the DataSourceRef field.'
data source. When the AnyVolumeDataSource feature
gate is enabled, dataSource contents will be copied
to dataSourceRef, and dataSourceRef contents will
be copied to dataSource when dataSourceRef.namespace
is not specified. If the namespace is specified,
then dataSourceRef will not be copied to dataSource.'
properties:
apiGroup:
description: APIGroup is the group for the resource
Expand All @@ -727,27 +730,35 @@ spec:
description: 'dataSourceRef specifies the object
from which to populate the volume with data, if
a non-empty volume is desired. This may be any
local object from a non-empty API group (non core
object) or a PersistentVolumeClaim object. When
this field is specified, volume binding will only
succeed if the type of the specified object matches
some installed volume populator or dynamic provisioner.
object from a non-empty API group (non core object)
or a PersistentVolumeClaim object. When this field
is specified, volume binding will only succeed
if the type of the specified object matches some
installed volume populator or dynamic provisioner.
This field will replace the functionality of the
DataSource field and as such if both fields are
dataSource field and as such if both fields are
non-empty, they must have the same value. For
backwards compatibility, both fields (DataSource
and DataSourceRef) will be set to the same value
backwards compatibility, when namespace isn''t
specified in dataSourceRef, both fields (dataSource
and dataSourceRef) will be set to the same value
automatically if one of them is empty and the
other is non-empty. There are two important differences
between DataSource and DataSourceRef: * While
DataSource only allows two specific types of objects,
DataSourceRef allows any non-core object, as well
as PersistentVolumeClaim objects. * While DataSource
ignores disallowed values (dropping them), DataSourceRef
preserves all values, and generates an error if
a disallowed value is specified. (Beta) Using
this field requires the AnyVolumeDataSource feature
gate to be enabled.'
other is non-empty. When namespace is specified
in dataSourceRef, dataSource isn''t set to the
same value and must be empty. There are three
important differences between dataSource and dataSourceRef:
* While dataSource only allows two specific types
of objects, dataSourceRef allows any non-core
object, as well as PersistentVolumeClaim objects.
* While dataSource ignores disallowed values (dropping
them), dataSourceRef preserves all values, and
generates an error if a disallowed value is specified.
* While dataSource only allows local objects,
dataSourceRef allows objects in any namespaces.
(Beta) Using this field requires the AnyVolumeDataSource
feature gate to be enabled. (Alpha) Using the
namespace field of dataSourceRef requires the
CrossNamespaceVolumeDataSource feature gate to
be enabled.'
properties:
apiGroup:
description: APIGroup is the group for the resource
Expand All @@ -764,6 +775,17 @@ spec:
description: Name is the name of resource being
referenced
type: string
namespace:
description: Namespace is the namespace of resource
being referenced Note that when a namespace
is specified, a gateway.networking.k8s.io/ReferenceGrant
object is required in the referent namespace
to allow that namespace's owner to accept
the reference. See the ReferenceGrant documentation
for details. (Alpha) This field requires the
CrossNamespaceVolumeDataSource feature gate
to be enabled.
type: string
required:
- kind
- name
Expand All @@ -776,6 +798,30 @@ spec:
value but must still be higher than capacity recorded
in the status field of the claim. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources'
properties:
claims:
description: "Claims lists the names of resources,
defined in spec.resourceClaims, that are used
by this container. \n This is an alpha field
and requires enabling the DynamicResourceAllocation
feature gate. \n This field is immutable."
items:
description: ResourceClaim references one
entry in PodSpec.ResourceClaims.
properties:
name:
description: Name must match the name
of one entry in pod.spec.resourceClaims
of the Pod where this field is used.
It makes that resource available inside
a container.
type: string
required:
- name
type: object
type: array
x-kubernetes-list-map-keys:
- name
x-kubernetes-list-type: map
limits:
additionalProperties:
anyOf:
Expand Down Expand Up @@ -1758,8 +1804,8 @@ spec:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's
current state. // Known .status.conditions.type are: \"Available\",
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/getporter.org_agentconfigs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ spec:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's
current state. // Known .status.conditions.type are: \"Available\",
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/getporter.org_credentialsets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ spec:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's
current state. // Known .status.conditions.type are: \"Available\",
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/getporter.org_installations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ spec:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's
current state. // Known .status.conditions.type are: \"Available\",
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
Expand Down
4 changes: 2 additions & 2 deletions config/crd/bases/getporter.org_parametersets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ spec:
description: "Condition contains details for one aspect of the current
state of this API Resource. --- This struct is intended for direct
use as an array at the field path .status.conditions. For example,
type FooStatus struct{ // Represents the observations of a foo's
current state. // Known .status.conditions.type are: \"Available\",
\n type FooStatus struct{ // Represents the observations of a
foo's current state. // Known .status.conditions.type are: \"Available\",
\"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge
// +listType=map // +listMapKey=type Conditions []metav1.Condition
`json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\"
Expand Down
Loading

0 comments on commit 088dc5d

Please sign in to comment.