Skip to content

Commit e5822e0

Browse files
authored
Merge pull request #178 from robszumski/long-term
Add long term goals to design docs
2 parents 7fc9228 + 5e55667 commit e5822e0

File tree

3 files changed

+56
-0
lines changed

3 files changed

+56
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
## SDK examples/docs show API norms authors should follow
2+
3+
**Goal:** Help Operator authors avoid common mistakes and usability issues that the community has learned through the various operators in use today.
4+
5+
**Problem:** There are three classes of mistakes that we have seen folks make:
6+
1. Methods for connecting Kubernetes objects through labels, OwnerRefs, status etc that may be incompatible with future updates or too restrictive in the long term.
7+
2. Attempting to add in remote connectivity directly into the Operator via an HTTP API. The Kubernetes API should be the source of desired state.
8+
3. Requiring state that is not stored within the cluster to operate safely.
9+
10+
**Why is this important:** The SDK will be successful if it solves problems for developers out of the box. Shipping updates and new features safely via an Operator is only possible when they are deployed and used correctly.
11+
12+
**Proposed work streams to accomplish this:**
13+
- Documentation for dos and don’ts for an Operator
14+
- Canonical sample operator that shows a complex use-case done correctly
15+
16+
**Open questions:**
17+
1. How much of the object organization is done via helper code in the SDK vs well-planned label queries and OwnerRefs by the developer?
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
## Simple Operator Extensions
2+
3+
**Goal:** ISVs choose the Operator SDK to ship their apps because it provides OOTB extensions for common enterprise asks, like audit logging, handling TLS, monitoring, etc. The SDK provides these capabilities as libraries that can be easily inserted into your business logic where it makes sense.
4+
5+
**Problem:** Kubernetes provides the unified stack that software vendors strive for. However, each vendor is left to writing code to utilize platform features. This leads to custom solutions, incorrect usage and security flaws. It’s impossible for one engineering team to be an expert in logging, monitoring, security, etc in addition to software they are providing.
6+
7+
**Why is this important:** The SDK should be solving hard problems and saving folks time. Vendors have different needs, and should be able to plug and play different features as they require them.
8+
9+
**Proposed work streams to accomplish this:**
10+
1. Provide methods for generating and storing TLS assets as secrets
11+
2. Operator emits Prometheus metrics by default and optional other ones can be created
12+
3. Ship default logging for generated code and methods for adding more
13+
4. Authentication/Authorization
14+
- example: deploy a database and provide access to a specific set of Kubernetes users with the same credentials
15+
5. Backup/Restore hooks
16+
- example: before/after upgrade
17+
6. Provide hooks into the Kubernetes audit log and event stream
18+
19+
**Open questions:**
20+
- none so far
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Make testing an Operator simple and easy
2+
3+
**Goal:** Make local development of Operators easy, so software vendors can produce high quality software.
4+
Make functional tests easy to integrate into a big matrix (upstream, OpenShift, GKE, etc) since we want the SDK to work equally well on all platforms.
5+
6+
**Problem:** Operators are inherently tied to a clustered environment, which complicates testing. Running a full cluster locally can be hard, and requiring a remote cluster is clunky. Aside from a single test cluster, running your Operator against the range of Kubernetes offering requires a ton of industry knowledge and expertise.
7+
8+
**Why is this important:** We think Operators are the best way to ship software on Kubernetes. This will naturally happen if we provide methods to build high quality software, of which testing is a huge part.
9+
10+
**Proposed work streams to accomplish this:**
11+
- Mock clients to enable unit testing without Kubernetes in under a second
12+
- Functional testing is run against X last releases via platform scripts in codebase
13+
- SDK provides a method to generate a functional testing container
14+
- Docs for using a test container and setting it up against a number of providers for use in a partners CI environment
15+
- Provide a way to run the Operator binary locally outside of a container
16+
- Eg. https://github.com/coreos/operator-sdk/issues/142
17+
18+
**Open questions:**
19+
- none so far

0 commit comments

Comments
 (0)