Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 02FD0200CA7 for ; Wed, 14 Jun 2017 18:26:50 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 01F42160BDB; Wed, 14 Jun 2017 16:26:50 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 48F78160BC0 for ; Wed, 14 Jun 2017 18:26:49 +0200 (CEST) Received: (qmail 41686 invoked by uid 500); 14 Jun 2017 16:26:48 -0000 Mailing-List: contact dev-help@openwhisk.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openwhisk.apache.org Delivered-To: mailing list dev@openwhisk.apache.org Received: (qmail 41674 invoked by uid 99); 14 Jun 2017 16:26:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 Jun 2017 16:26:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id C40181809E2 for ; Wed, 14 Jun 2017 16:26:47 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.779 X-Spam-Level: * X-Spam-Status: No, score=1.779 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id q2-tjatycomT for ; Wed, 14 Jun 2017 16:26:44 +0000 (UTC) Received: from mail-qt0-f179.google.com (mail-qt0-f179.google.com [209.85.216.179]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 048AF5F3BD for ; Wed, 14 Jun 2017 16:26:43 +0000 (UTC) Received: by mail-qt0-f179.google.com with SMTP id c10so5847365qtd.1 for ; Wed, 14 Jun 2017 09:26:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=5gSKL+wcZ9ek+PDJGwxniGn7SSuZPwkGldkc4ro4osw=; b=FGhUZdot585eo9qaOB8eYj//bczoXOyflmDpnLx9NUAyRzIUyKdHec1M5McMAZbj45 OFw8Mrthy49CSu+oXz74Rh+T7LARP3ZyU6a05aFCdBL93Dq35sOtQvluSW4STYxy1beU Nc1W9KtHzZ0ZLxFuGNvahc0N3s27m2asOog0Ca/+gXHfmR1CVAIaDqvdpMlw2i4XyAuN o2YPmt0DZOGFXpl873kjyXhYcdTqNdAQQhbTyQPfFIs6Sp+zz0hDHH2FsdpyCHOqjbuF 9qFhhn8rtmLR9YixnMppbb+NQqFNYgWjkIz8iDOi7z/tFfCxcNLrpSk8aPfv8ilWV7WB seBw== X-Gm-Message-State: AKS2vOyxtmdMZa3Qt4sTeCBzn87X7J+ZH3aUrBvO3smYyj7jndp+Mmrp me5WFlDjrFjJgAbQwTQJ11+TPFrX/xp63FY= X-Received: by 10.200.8.169 with SMTP id v38mr1103947qth.213.1497457597031; Wed, 14 Jun 2017 09:26:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.200.35.225 with HTTP; Wed, 14 Jun 2017 09:25:56 -0700 (PDT) In-Reply-To: References: From: Ben Browning Date: Wed, 14 Jun 2017 12:25:56 -0400 Message-ID: Subject: Re: Kubernetes + packages with persistent services To: dev@openwhisk.apache.org Content-Type: multipart/alternative; boundary="001a1145c4f22336060551ee04ad" archived-at: Wed, 14 Jun 2017 16:26:50 -0000 --001a1145c4f22336060551ee04ad Content-Type: text/plain; charset="UTF-8" For the first option, I'd suggest using a Kubernetes ConfigMap to store the actual config needed by the persistent service. The user can edit the ConfigMap as needed without having to worry about the other details. There could of course still be a script like installCatalog.sh that creates that ConfigMap based on provided values and deploys it along with the Deployment for the user. The larger question is really where should environment-specific deployment logic live, especially when it comes to packages. Today there doesn't seem to be any deployment instructions or Ansible files for the alarms package, for example. Do we want separate repositories with all the Kubernetes yml files for packages, similar to how the Kubernetes yml files for OpenWhisk itself are separated out into a separate repo? Add OpenShift, Mesos, and others to the mix and we need to have a plan for how we'll handle each environment. Ben On Wed, Jun 14, 2017 at 12:00 PM, Toby Crawley wrote: > With the move towards supporting Kubernetes, has anyone given any > thought to better handling packages that require a persistent service > be deployed somewhere (alarms, rss, etc)? > > When running on Kubernetes, I think we have the opportunity to make > using packages with persistent services a nicer experience. I have a > couple of ideas on that, and want to get feedback before going > further (and see if there are other approaches that would work): > > * Provide a deployment yaml file in the package repo that deploys the > persistent service, allowing the user to easily deploy via > kubectl. This may also require a script to create the deployment > config based on the environment needed by the service (database url, > credentials, etc). > > * Modify the setup actions to create deployments on demand when > needed, and destroying them when no longer needed (for example: only > having the cron service running when there are active cron > jobs). This option is much more invasive, and requires the setup > action to have Kubernetes credentials (and to know it is running > inside kube), but does reduce resource usage. > > Of those, I think the first option is probably what makes sense > currently. If that makes sense to others, I'm happy to provide PR's to > the package repos. > > - Toby > --001a1145c4f22336060551ee04ad--