Skip to content

Commit

Permalink
Merge pull request #410 from theBeginner86/theBeginner86/chore/12
Browse files Browse the repository at this point in the history
[chore] Revert removal of application_configuration
  • Loading branch information
theBeginner86 authored Nov 10, 2023
2 parents 27fdf59 + b901b80 commit f2919bb
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ require (
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 // indirect
oras.land/oras-go v1.2.4 // indirect
oras.land/oras-go v1.2.3 // indirect
sigs.k8s.io/controller-runtime v0.13.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1408,8 +1408,8 @@ k8s.io/utils v0.0.0-20210802155522-efc7438f0176/go.mod h1:jPW/WVKK9YHAvNhRxK0md/
k8s.io/utils v0.0.0-20211116205334-6203023598ed/go.mod h1:jPW/WVKK9YHAvNhRxK0md/EJ228hCsBRufyofKtW8HA=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2 h1:qY1Ad8PODbnymg2pRbkyMT/ylpTrCM8P2RJ0yroCyIk=
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2/go.mod h1:OLgZIPagt7ERELqWJFomSt595RzquPNLL48iOWgYOg0=
oras.land/oras-go v1.2.4 h1:djpBY2/2Cs1PV87GSJlxv4voajVOMZxqqtq9AB8YNvY=
oras.land/oras-go v1.2.4/go.mod h1:DYcGfb3YF1nKjcezfX2SNlDAeQFKSXmf+qrFmrh4324=
oras.land/oras-go v1.2.3 h1:v8PJl+gEAntI1pJ/LCrDgsuk+1PKVavVEPsYIHFE5uY=
oras.land/oras-go v1.2.3/go.mod h1:M/uaPdYklze0Vf3AakfarnpoEckvw0ESbRdN8Z1vdJg=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
Expand Down
47 changes: 47 additions & 0 deletions models/oam/core/v1alpha1/application_configuration.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

// Configuration is the structure for OAM Application Configuration
type Configuration struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`

Spec ConfigurationSpec `json:"spec,omitempty"`
}

// ConfigurationSpec is the structure for the OAM Application
// Configuration Spec
type ConfigurationSpec struct {
Components []ConfigurationSpecComponent
}

// ConfigurationSpecComponent is the struct for OAM Application
// Configuration's spec's components
type ConfigurationSpecComponent struct {
ComponentName string
Traits []ConfigurationSpecComponentTrait
Scopes []ConfigurationSpecComponentScope
}

// ConfigurationSpecComponentTrait is the struct
type ConfigurationSpecComponentTrait struct {
Name string
Properties map[string]interface{}
}

// ConfigurationSpecComponentScope struct defines the structure
// for scope of OAM application configuration's spec's component's scope
type ConfigurationSpecComponentScope struct {
ScopeRef ConfigurationSpecComponentScopeRef
}

// ConfigurationSpecComponentScopeRef struct defines the structure for
// scope of OAM application configuration's spec's component's scope's
// scopeRef
type ConfigurationSpecComponentScopeRef struct {
metav1.TypeMeta `json:",inline"`
Name string
}

0 comments on commit f2919bb

Please sign in to comment.