Skip to content

Commit 5caef35

Browse files
committed
Fix parrot chart
1 parent f986cfa commit 5caef35

File tree

2 files changed

+28
-34
lines changed

2 files changed

+28
-34
lines changed

lib/charts/parrot/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v2
22
name: parrot
33
version: 0.1.0
4-
appVersion: "0.5.1"
4+
appVersion: "0.5.0" # TODO: Update this to the latest version
55
type: application
66
description: Parrot enables dynamic mocking of HTTP calls.
77
keywords:

lib/k8s/pkg/helm/parrot/parrot.go

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ type Chart struct {
2626
Path string
2727
Version string
2828
Props *Props
29-
Values *map[string]interface{}
29+
Values *map[string]any
3030
}
3131

3232
func (m Chart) IsDeploymentNeeded() bool {
@@ -45,11 +45,11 @@ func (m Chart) GetVersion() string {
4545
return m.Version
4646
}
4747

48-
func (m Chart) GetProps() interface{} {
48+
func (m Chart) GetProps() any {
4949
return m.Props
5050
}
5151

52-
func (m Chart) GetValues() *map[string]interface{} {
52+
func (m Chart) GetValues() *map[string]any {
5353
return m.Values
5454
}
5555

@@ -87,51 +87,45 @@ func (m Chart) ExportData(e *environment.Environment) error {
8787
return nil
8888
}
8989

90-
func defaultProps() map[string]interface{} {
90+
func defaultProps() map[string]any {
9191
internalRepo := os.Getenv(config.EnvVarInternalDockerRepo)
92-
mockserverRepo := "parrot"
92+
parrotRepo := "kalverra/parrot"
9393
if internalRepo != "" {
94-
mockserverRepo = fmt.Sprintf("%s/parrot", internalRepo)
94+
parrotRepo = fmt.Sprintf("%s/parrot", internalRepo)
9595
}
9696

97-
return map[string]interface{}{
98-
"replicaCount": "1",
99-
"service": map[string]interface{}{
100-
"type": "NodePort",
101-
"port": "1080",
97+
return map[string]any{
98+
"image": map[string]any{
99+
"repository": parrotRepo,
100+
"version": "0.5.0", //TODO: Update to latest version
101+
"imagePullPolicy": "IfNotPresent",
102102
},
103-
"app": map[string]interface{}{
104-
"logLevel": "INFO",
105-
"serverPort": "1080",
106-
"mountedConfigMapName": "mockserver-config",
107-
"propertiesFileName": "mockserver.properties",
108-
"readOnlyRootFilesystem": "false",
109-
"resources": map[string]interface{}{
110-
"requests": map[string]interface{}{
111-
"cpu": "200m",
112-
"memory": "256Mi",
113-
},
114-
"limits": map[string]interface{}{
115-
"cpu": "200m",
116-
"memory": "256Mi",
117-
},
103+
"logLevel": "trace",
104+
"resources": map[string]any{
105+
"limits": map[string]any{
106+
"cpu": "250m",
107+
"memory": "256Mi",
118108
},
119109
},
120-
"image": map[string]interface{}{
121-
"repository": mockserverRepo,
122-
"version": "5.15.0",
123-
"snapshot": false,
124-
"pullPolicy": "IfNotPresent",
110+
"service": map[string]any{
111+
"type": "ClusterIP",
112+
"port": 80,
113+
},
114+
"persistence": map[string]any{
115+
"enabled": true,
116+
"accessMode": "ReadWriteOnce",
117+
"size": "1Gi",
118+
"mountPath": "/app",
125119
},
126120
}
127121
}
128122

129-
func New(props map[string]interface{}) environment.ConnectedChart {
123+
func New(props map[string]any) environment.ConnectedChart {
130124
return NewVersioned("", props)
131125
}
132126

133127
// NewVersioned enables choosing a specific helm chart version
134-
func NewVersioned(helmVersion string, props map[string]interface{}) environment.ConnectedChart {
128+
func NewVersioned(helmVersion string, props map[string]any) environment.ConnectedChart {
135129
dp := defaultProps()
136130
config.MustMerge(&dp, props)
137131
chartPath := "chainlink-qa/parrot"

0 commit comments

Comments
 (0)