Skip to content

Commit f314d70

Browse files
authored
Add s3proxy chart (#408)
Signed-off-by: Tamal Saha <tamal@appscode.com>
1 parent cc8d1ab commit f314d70

16 files changed

Lines changed: 1538 additions & 0 deletions

apis/installer/v1alpha1/register.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,8 @@ func addKnownTypes(scheme *runtime.Scheme) error {
116116
&OpenfgaList{},
117117
&Reloader{},
118118
&ReloaderList{},
119+
&S3proxy{},
120+
&S3proxyList{},
119121
&ServiceGatewayPresets{},
120122
&ServiceGatewayPresetsList{},
121123
&ServiceProvider{},

apis/installer/v1alpha1/s3proxy.go

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
/*
2+
Copyright AppsCode Inc. and Contributors
3+
4+
Licensed under the AppsCode Community License 1.0.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
package v1alpha1
18+
19+
import (
20+
core "k8s.io/api/core/v1"
21+
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
22+
)
23+
24+
const (
25+
ResourceKindS3proxy = "S3proxy"
26+
ResourceS3proxy = "s3proxy"
27+
ResourceS3proxys = "s3proxys"
28+
)
29+
30+
// S3proxy defines the schama for S3proxy Installer.
31+
32+
// +genclient
33+
// +genclient:skipVerbs=updateStatus
34+
// +k8s:openapi-gen=true
35+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
36+
37+
// +kubebuilder:object:root=true
38+
// +kubebuilder:resource:path=s3proxys,singular=s3proxy,categories={kubeops,appscode}
39+
type S3proxy struct {
40+
metav1.TypeMeta `json:",inline,omitempty"`
41+
metav1.ObjectMeta `json:"metadata,omitempty"`
42+
Spec S3proxySpec `json:"spec,omitempty"`
43+
}
44+
45+
// S3proxySpec is the schema for S3proxy Operator values file
46+
type S3proxySpec struct {
47+
ReplicaCount int `json:"replicaCount"`
48+
//+optional
49+
RegistryFQDN string `json:"registryFQDN"`
50+
Image ImageReference `json:"image"`
51+
//+optional
52+
ImagePullSecrets []string `json:"imagePullSecrets"`
53+
//+optional
54+
NameOverride string `json:"nameOverride"`
55+
//+optional
56+
FullnameOverride string `json:"fullnameOverride"`
57+
//+optional
58+
PodAnnotations map[string]string `json:"podAnnotations"`
59+
//+optional
60+
PodSecurityContext *core.PodSecurityContext `json:"podSecurityContext"`
61+
//+optional
62+
SecurityContext *core.SecurityContext `json:"securityContext"`
63+
Service AceServiceSpec `json:"service"`
64+
//+optional
65+
Resources core.ResourceRequirements `json:"resources"`
66+
//+optional
67+
NodeSelector map[string]string `json:"nodeSelector"`
68+
// If specified, the pod's tolerations.
69+
// +optional
70+
Tolerations []core.Toleration `json:"tolerations"`
71+
// If specified, the pod's scheduling constraints
72+
// +optional
73+
Affinity *core.Affinity `json:"affinity"`
74+
Persistence PersistenceSpec `json:"persistence"`
75+
StorageClass LocalObjectReference `json:"storageClass"`
76+
Ingress S3proxyIngress `json:"ingress"`
77+
S3proxy S3proxyConfig `json:"s3proxy"`
78+
}
79+
80+
type S3proxyIngress struct {
81+
Enabled bool `json:"enabled"`
82+
ClassName string `json:"className"`
83+
Annotations map[string]string `json:"annotations"`
84+
Domain string `json:"domain"`
85+
}
86+
87+
type S3proxyConfig struct {
88+
Auth S3proxyAuth `json:"auth"`
89+
TLS S3proxyTLS `json:"tls"`
90+
}
91+
92+
type S3proxyAuth struct {
93+
AccessKeyId string `json:"accessKeyId"`
94+
SecretAccessKey string `json:"secretAccessKey"`
95+
}
96+
97+
type S3proxyTLS struct {
98+
Enable bool `json:"enable"`
99+
Issuer CertificateIssuerRef `json:"issuer"`
100+
Secret LocalObjectReference `json:"secret"`
101+
}
102+
103+
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
104+
105+
// S3proxyList is a list of S3proxys
106+
type S3proxyList struct {
107+
metav1.TypeMeta `json:",inline"`
108+
metav1.ListMeta `json:"metadata,omitempty"`
109+
// Items is a list of S3proxy CRD objects
110+
Items []S3proxy `json:"items,omitempty"`
111+
}

apis/installer/v1alpha1/types_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ func TestDefaultValues(t *testing.T) {
5252
sc.TestCase{Obj: v1alpha1.PlatformApiSpec{}},
5353
sc.TestCase{Obj: v1alpha1.PlatformLinksSpec{}},
5454
sc.TestCase{Obj: v1alpha1.PlatformUiSpec{}},
55+
sc.TestCase{Obj: v1alpha1.S3proxySpec{}},
5556
sc.TestCase{Obj: v1alpha1.ServiceBackendSpec{}},
5657
sc.TestCase{Obj: v1alpha1.ServiceGatewayPresetsSpec{}},
5758
sc.TestCase{Obj: v1alpha1.ServiceProviderSpec{}},

apis/installer/v1alpha1/zz_generated.deepcopy.go

Lines changed: 192 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

charts/s3proxy/.helmignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/

charts/s3proxy/Chart.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
apiVersion: v2
2+
name: s3proxy
3+
description: A Helm chart for MinIO Demo Deployment
4+
type: application
5+
version: v2024.6.18
6+
appVersion: v0.0.1
7+
home: https://github.com/appscode-cloud
8+
icon: https://cdn.appscode.com/images/products/bytebuilders/icons/android-icon-192x192.png
9+
sources:
10+
- https://github.com/appscode-cloud
11+
maintainers:
12+
- name: appscode
13+
email: support@appscode.com

0 commit comments

Comments
 (0)