Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grant S3 access to notebook & dask pods #618

Merged
merged 2 commits into from
Aug 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions config/hubs/carbonplan.cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ hubs:
name: Carbon Plan
url: https://carbonplan.org
singleuser:
serviceAccountName: cloud-user-sa
initContainers:
# Need to explicitly fix ownership here, since EFS doesn't do anonuid
- name: volume-mount-ownership-fix
Expand Down Expand Up @@ -185,6 +186,13 @@ hubs:
cpu: 2
memory: 4Gi
gateway:
backend:
scheduler:
extraPodConfig:
serviceAccountName: cloud-user-sa
worker:
extraPodConfig:
serviceAccountName: cloud-user-sa
resources:
requests:
cpu: 0.5
Expand Down
26 changes: 23 additions & 3 deletions eksctl/carbonplan.jsonnet
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
// Exports an eksctl config file for carbonplan cluster
local cluster = import "./libsonnet/cluster.jsonnet";
local ng = import "./libsonnet/nodegroup.jsonnet";

// place all cluster nodes here
local clusterRegion = "us-west-2";
local masterAzs = ["us-west-2a", "us-west-2b", "us-west-2c"];
local nodeAz = "us-west-2a";

// List of namespaces where we have hubs deployed
// Each will get a ServiceAccount that will get credentials to talk
// to AWS services, via https://docs.aws.amazon.com/eks/latest/userguide/iam-roles-for-service-accounts.html
local namespaces = ['staging', 'prod'];

// Node definitions for notebook nodes. Config here is merged
// with our notebook node definition.
// A `node.kubernetes.io/instance-type label is added, so pods
Expand All @@ -33,12 +37,28 @@ local daskNodes = [
{ instancesDistribution+: { instanceTypes: ["r5.8xlarge"] }},
];

cluster {
{
apiVersion: 'eksctl.io/v1alpha5',
kind: 'ClusterConfig',
metadata+: {
name: "carbonplanhub",
region: clusterRegion
region: clusterRegion,
version: '1.19'
},
availabilityZones: masterAzs,
iam: {
withOIDC: true,

serviceAccounts: [{
metadata: {
name: "cloud-user-sa",
namespace: namespace
},
attachPolicyARNs:[
"arn:aws:iam::aws:policy/AmazonS3FullAccess"
],
} for namespace in namespaces],
},
nodeGroups: [
ng {
name: 'core-a',
Expand Down
19 changes: 0 additions & 19 deletions eksctl/libsonnet/cluster.jsonnet

This file was deleted.