Skip to content

Commit

Permalink
Patch memorystore samples (#1115)
Browse files Browse the repository at this point in the history
* adding missing region tags

* updating region tags

* updating region tags

* removing env (not required for Java, uses application.properties)
  • Loading branch information
jabubake authored May 30, 2018
1 parent 2a5650c commit 70c1984
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 12 deletions.
9 changes: 2 additions & 7 deletions memorystore/redis/gke_deployment/visit-counter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START memorystore_visitcounter_yaml]
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
Expand All @@ -28,12 +28,6 @@ spec:
containers:
- name: visit-counter
image: "gcr.io/<PROJECT_ID>/visit-counter:v1"
env:
- name: REDISHOST
valueFrom:
configMapKeyRef:
name: redishost
key: REDISHOST
ports:
- name: http
containerPort: 8080
Expand All @@ -50,3 +44,4 @@ spec:
- port: 80
targetPort: 8080
protocol: TCP
# [END memorystore_visitcounter_yaml]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// [START web_listener]
// [START memorystore_web_listener]

package com.example.redis;

Expand Down Expand Up @@ -70,4 +70,4 @@ public void contextInitialized(ServletContextEvent event) {
}
}
}
// [END web_listener]
// [END memorystore_web_listener]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// [START visit_servlet]
// [START memorystore_visit_servlet]

package com.example.redis;

Expand Down Expand Up @@ -50,4 +50,4 @@ public void doGet(HttpServletRequest req, HttpServletResponse resp) throws IOExc
}
}
}
// [END visit_servlet]
// [END memorystore_visit_servlet]
3 changes: 2 additions & 1 deletion memorystore/redis/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# [START memorystore_app_properties]
redis.host=REDIS_HOST_IP
redis.port=6379
# [END memorystore_app_properties]

0 comments on commit 70c1984

Please sign in to comment.