-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for missing objectstorage secret for thanos store (#307)
* Add support for missing objectstorage secret for thanos store Signed-off-by: Vibhu Prashar <vibhu.sharma2929@gmail.com> * Add review comments Signed-off-by: Vibhu Prashar <vibhu.sharma2929@gmail.com> --------- Signed-off-by: Vibhu Prashar <vibhu.sharma2929@gmail.com>
- Loading branch information
1 parent
04c9e46
commit dfc278d
Showing
25 changed files
with
220 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
examples/development-minio/pvc.yaml → examples/development-minio/minio-pvc.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: minio | ||
labels: | ||
app.kubernetes.io/name: minio | ||
name: minio | ||
namespace: thanos | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: 10Gi | ||
storage: 5Gi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
// These are the defaults for this components configuration. | ||
// When calling the function to generate the component's manifest, | ||
// you can pass an object structured like the default to overwrite default values. | ||
local defaults = { | ||
namespace: error 'must provide namespace', | ||
buckets: error 'must provide buckets', | ||
accessKey: error 'must provide accessKey', | ||
secretKey: error 'must provide secretKey', | ||
|
||
commonLabels:: { 'app.kubernetes.io/name': 'minio' }, | ||
}; | ||
|
||
function(params) { | ||
local minio = self, | ||
|
||
// Combine the defaults and the passed params to make the component's config. | ||
config:: defaults + params, | ||
|
||
deployment: { | ||
apiVersion: 'apps/v1', | ||
kind: 'Deployment', | ||
metadata: { | ||
name: 'minio', | ||
namespace: minio.config.namespace, | ||
}, | ||
spec: { | ||
selector: { | ||
matchLabels: minio.config.commonLabels, | ||
}, | ||
strategy: { type: 'Recreate' }, | ||
template: { | ||
metadata: { | ||
labels: minio.config.commonLabels, | ||
}, | ||
spec: { | ||
containers: [ | ||
{ | ||
command: [ | ||
'/bin/sh', | ||
'-c', | ||
||| | ||
mkdir -p %s && \ | ||
/usr/bin/docker-entrypoint.sh minio server /storage | ||
||| % std.join(' ', ['/storage/%s' % bucket for bucket in minio.config.buckets]), | ||
], | ||
env: [ | ||
{ | ||
name: 'MINIO_ROOT_USER', | ||
value: minio.config.accessKey, | ||
}, | ||
{ | ||
name: 'MINIO_ROOT_PASSWORD', | ||
value: minio.config.secretKey, | ||
}, | ||
], | ||
image: 'minio/minio:RELEASE.2023-05-27T05-56-19Z', | ||
imagePullPolicy: 'IfNotPresent', | ||
name: 'minio', | ||
ports: [ | ||
{ containerPort: 9000 }, | ||
], | ||
volumeMounts: [ | ||
{ mountPath: '/storage', name: 'storage' }, | ||
], | ||
}, | ||
], | ||
volumes: [{ | ||
name: 'storage', | ||
persistentVolumeClaim: { claimName: 'minio' }, | ||
}], | ||
}, | ||
}, | ||
}, | ||
}, | ||
|
||
pvc: { | ||
apiVersion: 'v1', | ||
kind: 'PersistentVolumeClaim', | ||
metadata: { | ||
labels: minio.config.commonLabels, | ||
name: 'minio', | ||
namespace: minio.config.namespace, | ||
}, | ||
spec: { | ||
accessModes: ['ReadWriteOnce'], | ||
resources: { | ||
requests: { storage: '5Gi' }, | ||
}, | ||
}, | ||
}, | ||
|
||
service: { | ||
apiVersion: 'v1', | ||
kind: 'Service', | ||
metadata: { | ||
name: 'minio', | ||
namespace: minio.config.namespace, | ||
}, | ||
spec: { | ||
ports: [ | ||
{ port: 9000, protocol: 'TCP', targetPort: 9000 }, | ||
], | ||
selector: minio.config.commonLabels, | ||
type: 'ClusterIP', | ||
}, | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.